fix special characters

This commit is contained in:
Abderahman88 2020-10-30 17:44:13 +01:00
parent f5d81dd70b
commit f64ebc5ad3
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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
},

View File

@ -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],