fast-xml-parser 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/package.json +1 -1
- package/src/fxp.d.ts +2 -2
- package/src/xmlparser/OrderedObjParser.js +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.
|
|
2
2
|
|
|
3
|
+
**4.3.4 / 2024-01-10**
|
|
4
|
+
* fix: Don't escape entities in CDATA sections (#633) (By [wackbyte](https://github.com/wackbyte))
|
|
5
|
+
|
|
3
6
|
**4.3.3 / 2024-01-10**
|
|
4
7
|
* Remove unnecessary regex
|
|
5
8
|
|
package/package.json
CHANGED
package/src/fxp.d.ts
CHANGED
|
@@ -387,10 +387,10 @@ export class XMLParser {
|
|
|
387
387
|
parse(xmlData: string | Buffer ,validationOptions?: validationOptions | boolean): any;
|
|
388
388
|
/**
|
|
389
389
|
* Add Entity which is not by default supported by this library
|
|
390
|
-
* @param
|
|
390
|
+
* @param entityIdentifier {string} Eg: 'ent' for &ent;
|
|
391
391
|
* @param entityValue {string} Eg: '\r'
|
|
392
392
|
*/
|
|
393
|
-
addEntity(
|
|
393
|
+
addEntity(entityIdentifier: string, entityValue: string): void;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
export class XMLValidator{
|
|
@@ -265,14 +265,13 @@ const parseXml = function(xmlData) {
|
|
|
265
265
|
|
|
266
266
|
textData = this.saveTextToParentTag(textData, currentNode, jPath);
|
|
267
267
|
|
|
268
|
+
let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);
|
|
269
|
+
if(val == undefined) val = "";
|
|
270
|
+
|
|
268
271
|
//cdata should be set even if it is 0 length string
|
|
269
272
|
if(this.options.cdataPropName){
|
|
270
|
-
// let val = this.parseTextData(tagExp, this.options.cdataPropName, jPath + "." + this.options.cdataPropName, true, false, true);
|
|
271
|
-
// if(!val) val = "";
|
|
272
273
|
currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);
|
|
273
274
|
}else{
|
|
274
|
-
let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true);
|
|
275
|
-
if(val == undefined) val = "";
|
|
276
275
|
currentNode.add(this.options.textNodeName, val);
|
|
277
276
|
}
|
|
278
277
|
|