fast-xml-parser 4.0.14 → 4.1.0
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
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.1.0 / 2023-02-02**
|
|
4
|
+
* Fix '<' or '>' in DTD comment throwing an error. (#533) (By [Adam Baker](https://github.com/Cwazywierdo))
|
|
5
|
+
* Set "eNotation" to 'true' as default
|
|
6
|
+
|
|
7
|
+
**4.0.15 / 2023-01-25**
|
|
8
|
+
* make "eNotation" optional
|
|
9
|
+
|
|
3
10
|
**4.0.14 / 2023-01-22**
|
|
4
11
|
* fixed: add missed typing "eNotation" to parse values
|
|
5
12
|
|
package/package.json
CHANGED
package/src/fxp.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ function readDocType(xmlData, i){
|
|
|
14
14
|
let hasBody = false, entity = false, comment = false;
|
|
15
15
|
let exp = "";
|
|
16
16
|
for(;i<xmlData.length;i++){
|
|
17
|
-
if (xmlData[i] === '<') {
|
|
17
|
+
if (xmlData[i] === '<' && !comment) {
|
|
18
18
|
if( hasBody &&
|
|
19
19
|
xmlData[i+1] === '!' &&
|
|
20
20
|
xmlData[i+2] === 'E' &&
|
|
@@ -78,14 +78,15 @@ function readDocType(xmlData, i){
|
|
|
78
78
|
if(comment){
|
|
79
79
|
if( xmlData[i - 1] === "-" && xmlData[i - 2] === "-"){
|
|
80
80
|
comment = false;
|
|
81
|
-
|
|
82
|
-
throw new Error(`Invalid XML comment in DOCTYPE`);
|
|
81
|
+
angleBracketsCount--;
|
|
83
82
|
}
|
|
84
|
-
}else
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
}else{
|
|
84
|
+
if(entity) {
|
|
85
|
+
parseEntityExp(exp, entities);
|
|
86
|
+
entity = false;
|
|
87
|
+
}
|
|
88
|
+
angleBracketsCount--;
|
|
87
89
|
}
|
|
88
|
-
angleBracketsCount--;
|
|
89
90
|
if (angleBracketsCount === 0) {
|
|
90
91
|
break;
|
|
91
92
|
}
|