From f64ebc5ad36c375d6bc47a2d93382672b5b3db3c Mon Sep 17 00:00:00 2001 From: Abderahman88 Date: Fri, 30 Oct 2020 17:44:13 +0100 Subject: [PATCH] fix special characters --- samples/react-content-query-webpart/Online/README.md | 1 + .../Online/config/package-solution.json | 2 +- .../Online/src/common/services/ContentQueryService.ts | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/react-content-query-webpart/Online/README.md b/samples/react-content-query-webpart/Online/README.md index 05ee78f9d..ade67febc 100644 --- a/samples/react-content-query-webpart/Online/README.md +++ b/samples/react-content-query-webpart/Online/README.md @@ -45,6 +45,7 @@ Version|Date|Comments 1.0.11|May 22, 2018|Fixed a bug causing filters to loose their sort order in IE 1.0.12|April 19, 2020|Upgraded to SPFx 1.10 1.0.13|April 28, 2020|Added support for Dynamic Data +1.0.14|October 30, 2020|Fixed (lookup-)fields with special characters ## Disclaimer diff --git a/samples/react-content-query-webpart/Online/config/package-solution.json b/samples/react-content-query-webpart/Online/config/package-solution.json index 04136d546..b16310eed 100644 --- a/samples/react-content-query-webpart/Online/config/package-solution.json +++ b/samples/react-content-query-webpart/Online/config/package-solution.json @@ -3,7 +3,7 @@ "solution": { "name": "React Content Query", "id": "00406271-0276-406f-9666-512623eb6709", - "version": "1.0.13.0", + "version": "1.0.14.0", "isDomainIsolated": false, "includeClientSideAssets": true }, diff --git a/samples/react-content-query-webpart/Online/src/common/services/ContentQueryService.ts b/samples/react-content-query-webpart/Online/src/common/services/ContentQueryService.ts index ffada9dab..8a0f9d472 100644 --- a/samples/react-content-query-webpart/Online/src/common/services/ContentQueryService.ts +++ b/samples/react-content-query-webpart/Online/src/common/services/ContentQueryService.ts @@ -578,10 +578,11 @@ export class ContentQueryService implements IContentQueryService { for(let result of results) { let normalizedResult: any = {}; - let formattedCharsRegex = /_x00(20|3a)_/gi; + let formattedCharsRegex = /_x00(20|3a|e0|e1|e2|e7|e8|e9|ea|ed|f3|f9|fa|fc)_/gi; for(let viewField of viewFields) { let formattedName = viewField.replace(formattedCharsRegex, "_x005f_x00$1_x005f_"); + formattedName = formattedName.replace(/_x00$/,"_x005f_x00"); normalizedResult[viewField] = { textValue: result.FieldValuesAsText[formattedName],