@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 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.2](https://github.com/xmldom/xmldom/compare/0.9.0-beta.1...0.9.0-beta.2)
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 path 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.
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 github issue or PR in the affected repository and mention @karfau.
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 peplies after 7 days, please us send a reminder!)
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 send an email to `security@xmldom.org`.
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 [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 advisuory)[https://docs.github.com/en/code-security/security-advisories/adding-a-collaborator-to-a-security-advisory].
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
- case '/':
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
- if(end<0){
130
-
131
- tagName = source.substring(tagStart+2).replace(/[\s<].*/,'');
132
- errorHandler.error("end tag name: "+tagName+' is not complete:'+config.tagName);
133
- end = tagStart+1+tagName.length;
134
- }else if(tagName.match(/\s</)){
135
- tagName = tagName.replace(/[\s<].*/,'');
136
- errorHandler.error("end tag name: "+tagName+' maybe not complete');
137
- end = tagStart+1+tagName.length;
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.2",
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",