@xmldom/xmldom 0.9.0-beta.2 → 0.9.0-beta.3
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 +34 -1
- package/SECURITY.md +8 -8
- package/lib/entities.js +235 -235
- package/lib/sax.js +11 -12
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,14 +4,46 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [0.9.0-beta.
|
|
7
|
+
## [0.9.0-beta.3](https://github.com/xmldom/xmldom/compare/0.9.0-beta.2...0.9.0-beta.3)
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- fix: Stop adding tags after incomplete closing tag [`#445`](https://github.com/xmldom/xmldom/pull/445) / [`#416`](https://github.com/xmldom/xmldom/pull/416)
|
|
12
|
+
BREAKING CHANGE: It no longer reports an error when parsing HTML containing incomplete closing tags, to align the behavior with the one in the browser.
|
|
13
|
+
BREAKING CHANGE: If your code relied on not well-formed XML to be parsed and include subsequent tags, this will no longer work.
|
|
14
|
+
- fix: Avoid bidirectional characters in source code [`#440`](https://github.com/xmldom/xmldom/pull/440)
|
|
15
|
+
|
|
16
|
+
### Other
|
|
17
|
+
|
|
18
|
+
- ci: Add CodeQL scan [`#444`](https://github.com/xmldom/xmldom/pull/444)
|
|
19
|
+
|
|
20
|
+
Thank you, [@ACN-kck](https://github.com/ACN-kck), [@mgerlach](https://github.com/mgerlach) for your contributions
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [0.7.6](https://github.com/xmldom/xmldom/compare/0.7.5...0.7.6)
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
- Avoid iterating over prototype properties [`#441`](https://github.com/xmldom/xmldom/pull/441) / [`#437`](https://github.com/xmldom/xmldom/pull/437) / [`#436`](https://github.com/xmldom/xmldom/issues/436)
|
|
8
27
|
|
|
28
|
+
Thank you, [@jftanner](https://github.com/jftanner), [@Supraja9726](https://github.com/Supraja9726) for your contributions
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [0.8.3](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.2)
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
- Avoid iterating over prototype properties [`#437`](https://github.com/xmldom/xmldom/pull/437) / [`#436`](https://github.com/xmldom/xmldom/issues/436)
|
|
35
|
+
|
|
36
|
+
Thank you, [@Supraja9726](https://github.com/Supraja9726) for your contributions
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [0.9.0-beta.2](https://github.com/xmldom/xmldom/compare/0.9.0-beta.1...0.9.0-beta.2)
|
|
9
40
|
|
|
10
41
|
### Fixed
|
|
11
42
|
- Avoid iterating over prototype properties [`#437`](https://github.com/xmldom/xmldom/pull/437) / [`#436`](https://github.com/xmldom/xmldom/issues/436)
|
|
12
43
|
|
|
13
44
|
Thank you, [@Supraja9726](https://github.com/Supraja9726) for your contributions
|
|
14
45
|
|
|
46
|
+
|
|
15
47
|
## [0.9.0-beta.1](https://github.com/xmldom/xmldom/compare/0.8.2...0.9.0-beta.1)
|
|
16
48
|
|
|
17
49
|
### Fixed
|
|
@@ -55,6 +87,7 @@ Thank you [@weiwu-zhang](https://github.com/weiwu-zhang) for your contributions
|
|
|
55
87
|
|
|
56
88
|
- update multiple devDependencies
|
|
57
89
|
|
|
90
|
+
|
|
58
91
|
## [0.8.2](https://github.com/xmldom/xmldom/compare/0.8.1...0.8.2)
|
|
59
92
|
|
|
60
93
|
### Fixed
|
package/SECURITY.md
CHANGED
|
@@ -6,20 +6,20 @@ The most up-to-date version of this document can be found at <https://github.com
|
|
|
6
6
|
|
|
7
7
|
This repository contains the code for the libraries `xmldom` and `@xmldom/xmldom` on npm.
|
|
8
8
|
|
|
9
|
-
As long as we didn't publish v1, we aim to maintain the last two minor versions with security fixes. If it is possible we provide security fixes as
|
|
10
|
-
If you think there is a good reason to also patch an earlier version let us know in a
|
|
11
|
-
The maintainers will consider it and if we agree and have/find the required resources, a patch for that version will be provided.
|
|
9
|
+
As long as we didn't publish v1, we aim to maintain the last two minor versions with security fixes. If it is possible we provide security fixes as patch versions.
|
|
10
|
+
If you think there is a good reason to also patch an earlier version, let us know in a GitHub issue or the release discussion once the fix has been provided.
|
|
11
|
+
The maintainers will consider it, and if we agree and have/find the required resources, a patch for that version will be provided.
|
|
12
12
|
|
|
13
13
|
Please notice that [we are no longer able to publish the (unscoped) `xmldom` package](https://github.com/xmldom/xmldom/issues/271),
|
|
14
14
|
and that all existing versions of `xmldom` are affected by at least one security vulnerability and should be considered deprecated.
|
|
15
15
|
You can still report issues regarding `xmldom` as described below.
|
|
16
16
|
|
|
17
|
-
If you need help with migrating from `xmldom` to `@xmldom/xmldom`, file a
|
|
17
|
+
If you need help with migrating from `xmldom` to `@xmldom/xmldom`, file a GitHub issue or PR in the affected repository and mention @karfau.
|
|
18
18
|
|
|
19
19
|
## Reporting vulnerabilities
|
|
20
20
|
|
|
21
21
|
Please email reports about any security related issues you find to `security@xmldom.org`, which will forward it to the list of maintainers.
|
|
22
|
-
The maintainers will try to respond within 7 calendar days. (If nobody
|
|
22
|
+
The maintainers will try to respond within 7 calendar days. (If nobody replies after 7 days, please us send a reminder!)
|
|
23
23
|
As part of you communication please make sure to always hit "Reply all", so all maintainers are kept in the loop.
|
|
24
24
|
|
|
25
25
|
In addition, please include the following information along with your report:
|
|
@@ -29,15 +29,15 @@ In addition, please include the following information along with your report:
|
|
|
29
29
|
- An explanation who can exploit this vulnerability, and what they gain when doing so -- write an attack scenario. This will help us evaluate your report quickly, especially if the issue is complex.
|
|
30
30
|
- Whether this vulnerability public or known to third parties. If it is, please provide details.
|
|
31
31
|
|
|
32
|
-
If you believe that an existing (public) issue is security-related, please
|
|
32
|
+
If you believe that an existing (public) issue is security-related, please email `security@xmldom.org`.
|
|
33
33
|
The email should include the issue URL and a short description of why it should be handled according to this security policy.
|
|
34
34
|
|
|
35
35
|
Once an issue is reported, the maintainers use the following disclosure process:
|
|
36
36
|
|
|
37
37
|
- When a report is received, we confirm the issue, determine its severity and the affected versions.
|
|
38
38
|
- If we know of specific third-party services or software based on xmldom that require mitigation before publication, those projects will be notified.
|
|
39
|
-
- A [
|
|
40
|
-
- If the reporter provides a
|
|
39
|
+
- A [GitHub security advisory](https://docs.github.com/en/code-security/security-advisories/about-github-security-advisories) is [created](https://docs.github.com/en/code-security/security-advisories/creating-a-security-advisory) (but not published) which details the problem and steps for mitigation.
|
|
40
|
+
- If the reporter provides a GitHub account and agrees to it, we [add that GitHub account as a collaborator on the advisory](https://docs.github.com/en/code-security/security-advisories/adding-a-collaborator-to-a-security-advisory).
|
|
41
41
|
- The vulnerability is fixed in a [private fork](https://docs.github.com/en/code-security/security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability) and potential workarounds are identified.
|
|
42
42
|
- The maintainers audit the existing code to find any potential similar problems.
|
|
43
43
|
- The release for the current minor version and the [security advisory are published](https://docs.github.com/en/code-security/security-advisories/publishing-a-security-advisory).
|
package/lib/entities.js
CHANGED
|
@@ -30,242 +30,242 @@ exports.HTML_ENTITIES = freeze({
|
|
|
30
30
|
amp: '&',
|
|
31
31
|
quot: '"',
|
|
32
32
|
apos: "'",
|
|
33
|
-
Agrave: "
|
|
34
|
-
Aacute: "
|
|
35
|
-
Acirc: "
|
|
36
|
-
Atilde: "
|
|
37
|
-
Auml: "
|
|
38
|
-
Aring: "
|
|
39
|
-
AElig: "
|
|
40
|
-
Ccedil: "
|
|
41
|
-
Egrave: "
|
|
42
|
-
Eacute: "
|
|
43
|
-
Ecirc: "
|
|
44
|
-
Euml: "
|
|
45
|
-
Igrave: "
|
|
46
|
-
Iacute: "
|
|
47
|
-
Icirc: "
|
|
48
|
-
Iuml: "
|
|
49
|
-
ETH: "
|
|
50
|
-
Ntilde: "
|
|
51
|
-
Ograve: "
|
|
52
|
-
Oacute: "
|
|
53
|
-
Ocirc: "
|
|
54
|
-
Otilde: "
|
|
55
|
-
Ouml: "
|
|
56
|
-
Oslash: "
|
|
57
|
-
Ugrave: "
|
|
58
|
-
Uacute: "
|
|
59
|
-
Ucirc: "
|
|
60
|
-
Uuml: "
|
|
61
|
-
Yacute: "
|
|
62
|
-
THORN: "
|
|
63
|
-
szlig: "
|
|
64
|
-
agrave: "
|
|
65
|
-
aacute: "
|
|
66
|
-
acirc: "
|
|
67
|
-
atilde: "
|
|
68
|
-
auml: "
|
|
69
|
-
aring: "
|
|
70
|
-
aelig: "
|
|
71
|
-
ccedil: "
|
|
72
|
-
egrave: "
|
|
73
|
-
eacute: "
|
|
74
|
-
ecirc: "
|
|
75
|
-
euml: "
|
|
76
|
-
igrave: "
|
|
77
|
-
iacute: "
|
|
78
|
-
icirc: "
|
|
79
|
-
iuml: "
|
|
80
|
-
eth: "
|
|
81
|
-
ntilde: "
|
|
82
|
-
ograve: "
|
|
83
|
-
oacute: "
|
|
84
|
-
ocirc: "
|
|
85
|
-
otilde: "
|
|
86
|
-
ouml: "
|
|
87
|
-
oslash: "
|
|
88
|
-
ugrave: "
|
|
89
|
-
uacute: "
|
|
90
|
-
ucirc: "
|
|
91
|
-
uuml: "
|
|
92
|
-
yacute: "
|
|
93
|
-
thorn: "
|
|
94
|
-
yuml: "
|
|
33
|
+
Agrave: "\u00C0",
|
|
34
|
+
Aacute: "\u00C1",
|
|
35
|
+
Acirc: "\u00C2",
|
|
36
|
+
Atilde: "\u00C3",
|
|
37
|
+
Auml: "\u00C4",
|
|
38
|
+
Aring: "\u00C5",
|
|
39
|
+
AElig: "\u00C6",
|
|
40
|
+
Ccedil: "\u00C7",
|
|
41
|
+
Egrave: "\u00C8",
|
|
42
|
+
Eacute: "\u00C9",
|
|
43
|
+
Ecirc: "\u00CA",
|
|
44
|
+
Euml: "\u00CB",
|
|
45
|
+
Igrave: "\u00CC",
|
|
46
|
+
Iacute: "\u00CD",
|
|
47
|
+
Icirc: "\u00CE",
|
|
48
|
+
Iuml: "\u00CF",
|
|
49
|
+
ETH: "\u00D0",
|
|
50
|
+
Ntilde: "\u00D1",
|
|
51
|
+
Ograve: "\u00D2",
|
|
52
|
+
Oacute: "\u00D3",
|
|
53
|
+
Ocirc: "\u00D4",
|
|
54
|
+
Otilde: "\u00D5",
|
|
55
|
+
Ouml: "\u00D6",
|
|
56
|
+
Oslash: "\u00D8",
|
|
57
|
+
Ugrave: "\u00D9",
|
|
58
|
+
Uacute: "\u00DA",
|
|
59
|
+
Ucirc: "\u00DB",
|
|
60
|
+
Uuml: "\u00DC",
|
|
61
|
+
Yacute: "\u00DD",
|
|
62
|
+
THORN: "\u00DE",
|
|
63
|
+
szlig: "\u00DF",
|
|
64
|
+
agrave: "\u00E0",
|
|
65
|
+
aacute: "\u00E1",
|
|
66
|
+
acirc: "\u00E2",
|
|
67
|
+
atilde: "\u00E3",
|
|
68
|
+
auml: "\u00E4",
|
|
69
|
+
aring: "\u00E5",
|
|
70
|
+
aelig: "\u00E6",
|
|
71
|
+
ccedil: "\u00E7",
|
|
72
|
+
egrave: "\u00E8",
|
|
73
|
+
eacute: "\u00E9",
|
|
74
|
+
ecirc: "\u00EA",
|
|
75
|
+
euml: "\u00EB",
|
|
76
|
+
igrave: "\u00EC",
|
|
77
|
+
iacute: "\u00ED",
|
|
78
|
+
icirc: "\u00EE",
|
|
79
|
+
iuml: "\u00EF",
|
|
80
|
+
eth: "\u00F0",
|
|
81
|
+
ntilde: "\u00F1",
|
|
82
|
+
ograve: "\u00F2",
|
|
83
|
+
oacute: "\u00F3",
|
|
84
|
+
ocirc: "\u00F4",
|
|
85
|
+
otilde: "\u00F5",
|
|
86
|
+
ouml: "\u00F6",
|
|
87
|
+
oslash: "\u00F8",
|
|
88
|
+
ugrave: "\u00F9",
|
|
89
|
+
uacute: "\u00FA",
|
|
90
|
+
ucirc: "\u00FB",
|
|
91
|
+
uuml: "\u00FC",
|
|
92
|
+
yacute: "\u00FD",
|
|
93
|
+
thorn: "\u00FE",
|
|
94
|
+
yuml: "\u00FF",
|
|
95
95
|
nbsp: "\u00a0",
|
|
96
|
-
iexcl: "
|
|
97
|
-
cent: "
|
|
98
|
-
pound: "
|
|
99
|
-
curren: "
|
|
100
|
-
yen: "
|
|
101
|
-
brvbar: "
|
|
102
|
-
sect: "
|
|
103
|
-
uml: "
|
|
104
|
-
copy: "
|
|
105
|
-
ordf: "
|
|
106
|
-
laquo: "
|
|
107
|
-
not: "
|
|
108
|
-
shy: "
|
|
109
|
-
reg: "
|
|
110
|
-
macr: "
|
|
111
|
-
deg: "
|
|
112
|
-
plusmn: "
|
|
113
|
-
sup2: "
|
|
114
|
-
sup3: "
|
|
115
|
-
acute: "
|
|
116
|
-
micro: "
|
|
117
|
-
para: "
|
|
118
|
-
middot: "
|
|
119
|
-
cedil: "
|
|
120
|
-
sup1: "
|
|
121
|
-
ordm: "
|
|
122
|
-
raquo: "
|
|
123
|
-
frac14: "
|
|
124
|
-
frac12: "
|
|
125
|
-
frac34: "
|
|
126
|
-
iquest: "
|
|
127
|
-
times: "
|
|
128
|
-
divide: "
|
|
129
|
-
forall: "
|
|
130
|
-
part: "
|
|
131
|
-
exist: "
|
|
132
|
-
empty: "
|
|
133
|
-
nabla: "
|
|
134
|
-
isin: "
|
|
135
|
-
notin: "
|
|
136
|
-
ni: "
|
|
137
|
-
prod: "
|
|
138
|
-
sum: "
|
|
139
|
-
minus: "
|
|
140
|
-
lowast: "
|
|
141
|
-
radic: "
|
|
142
|
-
prop: "
|
|
143
|
-
infin: "
|
|
144
|
-
ang: "
|
|
145
|
-
and: "
|
|
146
|
-
or: "
|
|
147
|
-
cap: "
|
|
148
|
-
cup: "
|
|
149
|
-
'int': "
|
|
150
|
-
there4: "
|
|
151
|
-
sim: "
|
|
152
|
-
cong: "
|
|
153
|
-
asymp: "
|
|
154
|
-
ne: "
|
|
155
|
-
equiv: "
|
|
156
|
-
le: "
|
|
157
|
-
ge: "
|
|
158
|
-
sub: "
|
|
159
|
-
sup: "
|
|
160
|
-
nsub: "
|
|
161
|
-
sube: "
|
|
162
|
-
supe: "
|
|
163
|
-
oplus: "
|
|
164
|
-
otimes: "
|
|
165
|
-
perp: "
|
|
166
|
-
sdot: "
|
|
167
|
-
Alpha: "
|
|
168
|
-
Beta: "
|
|
169
|
-
Gamma: "
|
|
170
|
-
Delta: "
|
|
171
|
-
Epsilon: "
|
|
172
|
-
Zeta: "
|
|
173
|
-
Eta: "
|
|
174
|
-
Theta: "
|
|
175
|
-
Iota: "
|
|
176
|
-
Kappa: "
|
|
177
|
-
Lambda: "
|
|
178
|
-
Mu: "
|
|
179
|
-
Nu: "
|
|
180
|
-
Xi: "
|
|
181
|
-
Omicron: "
|
|
182
|
-
Pi: "
|
|
183
|
-
Rho: "
|
|
184
|
-
Sigma: "
|
|
185
|
-
Tau: "
|
|
186
|
-
Upsilon: "
|
|
187
|
-
Phi: "
|
|
188
|
-
Chi: "
|
|
189
|
-
Psi: "
|
|
190
|
-
Omega: "
|
|
191
|
-
alpha: "
|
|
192
|
-
beta: "
|
|
193
|
-
gamma: "
|
|
194
|
-
delta: "
|
|
195
|
-
epsilon: "
|
|
196
|
-
zeta: "
|
|
197
|
-
eta: "
|
|
198
|
-
theta: "
|
|
199
|
-
iota: "
|
|
200
|
-
kappa: "
|
|
201
|
-
lambda: "
|
|
202
|
-
mu: "
|
|
203
|
-
nu: "
|
|
204
|
-
xi: "
|
|
205
|
-
omicron: "
|
|
206
|
-
pi: "
|
|
207
|
-
rho: "
|
|
208
|
-
sigmaf: "
|
|
209
|
-
sigma: "
|
|
210
|
-
tau: "
|
|
211
|
-
upsilon: "
|
|
212
|
-
phi: "
|
|
213
|
-
chi: "
|
|
214
|
-
psi: "
|
|
215
|
-
omega: "
|
|
216
|
-
thetasym: "
|
|
217
|
-
upsih: "
|
|
218
|
-
piv: "
|
|
219
|
-
OElig: "
|
|
220
|
-
oelig: "
|
|
221
|
-
Scaron: "
|
|
222
|
-
scaron: "
|
|
223
|
-
Yuml: "
|
|
224
|
-
fnof: "
|
|
225
|
-
circ: "
|
|
226
|
-
tilde: "
|
|
227
|
-
ensp: "
|
|
228
|
-
emsp: "
|
|
229
|
-
thinsp: "
|
|
230
|
-
zwnj: "
|
|
231
|
-
zwj: "
|
|
232
|
-
lrm: "
|
|
233
|
-
rlm: "
|
|
234
|
-
ndash: "
|
|
235
|
-
mdash: "
|
|
236
|
-
lsquo: "
|
|
237
|
-
rsquo: "
|
|
238
|
-
sbquo: "
|
|
239
|
-
ldquo: "
|
|
240
|
-
rdquo: "
|
|
241
|
-
bdquo: "
|
|
242
|
-
dagger: "
|
|
243
|
-
Dagger: "
|
|
244
|
-
bull: "
|
|
245
|
-
hellip: "
|
|
246
|
-
permil: "
|
|
247
|
-
prime: "
|
|
248
|
-
Prime: "
|
|
249
|
-
lsaquo: "
|
|
250
|
-
rsaquo: "
|
|
251
|
-
oline: "
|
|
252
|
-
euro: "
|
|
253
|
-
trade: "
|
|
254
|
-
larr: "
|
|
255
|
-
uarr: "
|
|
256
|
-
rarr: "
|
|
257
|
-
darr: "
|
|
258
|
-
harr: "
|
|
259
|
-
crarr: "
|
|
260
|
-
lceil: "
|
|
261
|
-
rceil: "
|
|
262
|
-
lfloor: "
|
|
263
|
-
rfloor: "
|
|
264
|
-
loz: "
|
|
265
|
-
spades: "
|
|
266
|
-
clubs: "
|
|
267
|
-
hearts: "
|
|
268
|
-
diams: "
|
|
96
|
+
iexcl: "\u00A1",
|
|
97
|
+
cent: "\u00A2",
|
|
98
|
+
pound: "\u00A3",
|
|
99
|
+
curren: "\u00A4",
|
|
100
|
+
yen: "\u00A5",
|
|
101
|
+
brvbar: "\u00A6",
|
|
102
|
+
sect: "\u00A7",
|
|
103
|
+
uml: "\u00A8",
|
|
104
|
+
copy: "\u00A9",
|
|
105
|
+
ordf: "\u00AA",
|
|
106
|
+
laquo: "\u00AB",
|
|
107
|
+
not: "\u00AC",
|
|
108
|
+
shy: "\u00AD",
|
|
109
|
+
reg: "\u00AE",
|
|
110
|
+
macr: "\u00AF",
|
|
111
|
+
deg: "\u00B0",
|
|
112
|
+
plusmn: "\u00B1",
|
|
113
|
+
sup2: "\u00B2",
|
|
114
|
+
sup3: "\u00B3",
|
|
115
|
+
acute: "\u00B4",
|
|
116
|
+
micro: "\u00B5",
|
|
117
|
+
para: "\u00B6",
|
|
118
|
+
middot: "\u00B7",
|
|
119
|
+
cedil: "\u00B8",
|
|
120
|
+
sup1: "\u00B9",
|
|
121
|
+
ordm: "\u00BA",
|
|
122
|
+
raquo: "\u00BB",
|
|
123
|
+
frac14: "\u00BC",
|
|
124
|
+
frac12: "\u00BD",
|
|
125
|
+
frac34: "\u00BE",
|
|
126
|
+
iquest: "\u00BF",
|
|
127
|
+
times: "\u00D7",
|
|
128
|
+
divide: "\u00F7",
|
|
129
|
+
forall: "\u2200",
|
|
130
|
+
part: "\u2202",
|
|
131
|
+
exist: "\u2203",
|
|
132
|
+
empty: "\u2205",
|
|
133
|
+
nabla: "\u2207",
|
|
134
|
+
isin: "\u2208",
|
|
135
|
+
notin: "\u2209",
|
|
136
|
+
ni: "\u220B",
|
|
137
|
+
prod: "\u220F",
|
|
138
|
+
sum: "\u2211",
|
|
139
|
+
minus: "\u2212",
|
|
140
|
+
lowast: "\u2217",
|
|
141
|
+
radic: "\u221A",
|
|
142
|
+
prop: "\u221D",
|
|
143
|
+
infin: "\u221E",
|
|
144
|
+
ang: "\u2220",
|
|
145
|
+
and: "\u2227",
|
|
146
|
+
or: "\u2228",
|
|
147
|
+
cap: "\u2229",
|
|
148
|
+
cup: "\u222A",
|
|
149
|
+
'int': "\u222B",
|
|
150
|
+
there4: "\u2234",
|
|
151
|
+
sim: "\u223C",
|
|
152
|
+
cong: "\u2245",
|
|
153
|
+
asymp: "\u2248",
|
|
154
|
+
ne: "\u2260",
|
|
155
|
+
equiv: "\u2261",
|
|
156
|
+
le: "\u2264",
|
|
157
|
+
ge: "\u2265",
|
|
158
|
+
sub: "\u2282",
|
|
159
|
+
sup: "\u2283",
|
|
160
|
+
nsub: "\u2284",
|
|
161
|
+
sube: "\u2286",
|
|
162
|
+
supe: "\u2287",
|
|
163
|
+
oplus: "\u2295",
|
|
164
|
+
otimes: "\u2297",
|
|
165
|
+
perp: "\u22A5",
|
|
166
|
+
sdot: "\u22C5",
|
|
167
|
+
Alpha: "\u0391",
|
|
168
|
+
Beta: "\u0392",
|
|
169
|
+
Gamma: "\u0393",
|
|
170
|
+
Delta: "\u0394",
|
|
171
|
+
Epsilon: "\u0395",
|
|
172
|
+
Zeta: "\u0396",
|
|
173
|
+
Eta: "\u0397",
|
|
174
|
+
Theta: "\u0398",
|
|
175
|
+
Iota: "\u0399",
|
|
176
|
+
Kappa: "\u039A",
|
|
177
|
+
Lambda: "\u039B",
|
|
178
|
+
Mu: "\u039C",
|
|
179
|
+
Nu: "\u039D",
|
|
180
|
+
Xi: "\u039E",
|
|
181
|
+
Omicron: "\u039F",
|
|
182
|
+
Pi: "\u03A0",
|
|
183
|
+
Rho: "\u03A1",
|
|
184
|
+
Sigma: "\u03A3",
|
|
185
|
+
Tau: "\u03A4",
|
|
186
|
+
Upsilon: "\u03A5",
|
|
187
|
+
Phi: "\u03A6",
|
|
188
|
+
Chi: "\u03A7",
|
|
189
|
+
Psi: "\u03A8",
|
|
190
|
+
Omega: "\u03A9",
|
|
191
|
+
alpha: "\u03B1",
|
|
192
|
+
beta: "\u03B2",
|
|
193
|
+
gamma: "\u03B3",
|
|
194
|
+
delta: "\u03B4",
|
|
195
|
+
epsilon: "\u03B5",
|
|
196
|
+
zeta: "\u03B6",
|
|
197
|
+
eta: "\u03B7",
|
|
198
|
+
theta: "\u03B8",
|
|
199
|
+
iota: "\u03B9",
|
|
200
|
+
kappa: "\u03BA",
|
|
201
|
+
lambda: "\u03BB",
|
|
202
|
+
mu: "\u03BC",
|
|
203
|
+
nu: "\u03BD",
|
|
204
|
+
xi: "\u03BE",
|
|
205
|
+
omicron: "\u03BF",
|
|
206
|
+
pi: "\u03C0",
|
|
207
|
+
rho: "\u03C1",
|
|
208
|
+
sigmaf: "\u03C2",
|
|
209
|
+
sigma: "\u03C3",
|
|
210
|
+
tau: "\u03C4",
|
|
211
|
+
upsilon: "\u03C5",
|
|
212
|
+
phi: "\u03C6",
|
|
213
|
+
chi: "\u03C7",
|
|
214
|
+
psi: "\u03C8",
|
|
215
|
+
omega: "\u03C9",
|
|
216
|
+
thetasym: "\u03D1",
|
|
217
|
+
upsih: "\u03D2",
|
|
218
|
+
piv: "\u03D6",
|
|
219
|
+
OElig: "\u0152",
|
|
220
|
+
oelig: "\u0153",
|
|
221
|
+
Scaron: "\u0160",
|
|
222
|
+
scaron: "\u0161",
|
|
223
|
+
Yuml: "\u0178",
|
|
224
|
+
fnof: "\u0192",
|
|
225
|
+
circ: "\u02C6",
|
|
226
|
+
tilde: "\u02DC",
|
|
227
|
+
ensp: "\u2002",
|
|
228
|
+
emsp: "\u2003",
|
|
229
|
+
thinsp: "\u2009",
|
|
230
|
+
zwnj: "\u200C",
|
|
231
|
+
zwj: "\u200D",
|
|
232
|
+
lrm: "\u200E",
|
|
233
|
+
rlm: "\u200F",
|
|
234
|
+
ndash: "\u2013",
|
|
235
|
+
mdash: "\u2014",
|
|
236
|
+
lsquo: "\u2018",
|
|
237
|
+
rsquo: "\u2019",
|
|
238
|
+
sbquo: "\u201A",
|
|
239
|
+
ldquo: "\u201C",
|
|
240
|
+
rdquo: "\u201D",
|
|
241
|
+
bdquo: "\u201E",
|
|
242
|
+
dagger: "\u2020",
|
|
243
|
+
Dagger: "\u2021",
|
|
244
|
+
bull: "\u2022",
|
|
245
|
+
hellip: "\u2026",
|
|
246
|
+
permil: "\u2030",
|
|
247
|
+
prime: "\u2032",
|
|
248
|
+
Prime: "\u2033",
|
|
249
|
+
lsaquo: "\u2039",
|
|
250
|
+
rsaquo: "\u203A",
|
|
251
|
+
oline: "\u203E",
|
|
252
|
+
euro: "\u20AC",
|
|
253
|
+
trade: "\u2122",
|
|
254
|
+
larr: "\u2190",
|
|
255
|
+
uarr: "\u2191",
|
|
256
|
+
rarr: "\u2192",
|
|
257
|
+
darr: "\u2193",
|
|
258
|
+
harr: "\u2194",
|
|
259
|
+
crarr: "\u21B5",
|
|
260
|
+
lceil: "\u2308",
|
|
261
|
+
rceil: "\u2309",
|
|
262
|
+
lfloor: "\u230A",
|
|
263
|
+
rfloor: "\u230B",
|
|
264
|
+
loz: "\u25CA",
|
|
265
|
+
spades: "\u2660",
|
|
266
|
+
clubs: "\u2663",
|
|
267
|
+
hearts: "\u2665",
|
|
268
|
+
diams: "\u2666"
|
|
269
269
|
});
|
|
270
270
|
|
|
271
271
|
/**
|
package/lib/sax.js
CHANGED
|
@@ -122,19 +122,18 @@ function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
|
|
|
122
122
|
appendText(tagStart);
|
|
123
123
|
}
|
|
124
124
|
switch(source.charAt(tagStart+1)){
|
|
125
|
-
|
|
126
|
-
var end = source.indexOf('>',tagStart+3);
|
|
127
|
-
var tagName = source.substring(tagStart + 2, end).replace(/[ \t\n\r]+$/g, '');
|
|
125
|
+
case '/':
|
|
128
126
|
var config = parseStack.pop();
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
127
|
+
var end = source.indexOf(">", tagStart + 3);
|
|
128
|
+
var tagNameRaw = source.substring(tagStart + 2, end > 0 ? end : undefined);
|
|
129
|
+
var tagNameMatch = new RegExp("(" + tagNamePattern.source.slice(0, -1) + ")").exec(tagNameRaw);
|
|
130
|
+
// for the root level the config does not contain the tagName
|
|
131
|
+
var tagName = tagNameMatch && tagNameMatch[1] ? tagNameMatch[1] : (config.tagName || domBuilder.doc.documentElement.tagName);
|
|
132
|
+
if (end < 0) {
|
|
133
|
+
errorHandler.error("end tag name: " + tagName + " is not complete");
|
|
134
|
+
end = tagStart + 1 + tagName.length;
|
|
135
|
+
} else if (tagNameRaw.match(/</) && !isHTML) {
|
|
136
|
+
errorHandler.error("end tag name: " + tagName + " maybe not complete");
|
|
138
137
|
}
|
|
139
138
|
var localNSMap = config.localNSMap;
|
|
140
139
|
var endMatch = config.tagName == tagName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmldom/xmldom",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.3",
|
|
4
4
|
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"w3c",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"auto-changelog": "2.4.0",
|
|
47
47
|
"eslint": "8.25.0",
|
|
48
48
|
"eslint-config-prettier": "8.5.0",
|
|
49
|
+
"eslint-plugin-anti-trojan-source": "1.1.0",
|
|
49
50
|
"eslint-plugin-es5": "1.5.0",
|
|
50
51
|
"eslint-plugin-prettier": "4.2.1",
|
|
51
52
|
"get-stream": "6.0.1",
|