@xmldom/xmldom 0.9.0-beta.1 → 0.9.0-beta.11
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 +302 -8
- package/SECURITY.md +8 -8
- package/index.d.ts +369 -21
- package/lib/.eslintrc.yml +1 -0
- package/lib/conventions.js +192 -112
- package/lib/dom-parser.js +301 -232
- package/lib/dom.js +1465 -871
- package/lib/entities.js +2150 -254
- package/lib/grammar.js +528 -0
- package/lib/index.js +19 -5
- package/lib/sax.js +717 -479
- package/package.json +71 -67
- package/readme.md +31 -42
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,299 @@ 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.11](https://github.com/xmldom/xmldom/compare/0.9.0-beta.10...0.9.0-beta.11)
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- report more non well-formed cases [`#519`](https://github.com/xmldom/xmldom/pull/519) / [`#45`](https://github.com/xmldom/xmldom/issues/45) / [`#125`](https://github.com/xmldom/xmldom/issues/125) / [`#467`](https://github.com/xmldom/xmldom/issues/467)
|
|
12
|
+
BREAKING-CHANGE: Reports more not well-formed documents as fatalError
|
|
13
|
+
and drop broken support for optional and unclosed tags in HTML.
|
|
14
|
+
|
|
15
|
+
### Other
|
|
16
|
+
|
|
17
|
+
- Translate/drop non English comments [`#518`](https://github.com/xmldom/xmldom/pull/518)
|
|
18
|
+
- use node v16 for development [`#517`](https://github.com/xmldom/xmldom/pull/517)
|
|
19
|
+
|
|
20
|
+
Thank you, [@brodybits](https://github.com/brodybits), [@cbettinger](https://github.com/cbettinger), [@josecarlosrx](https://github.com/josecarlosrx), for your contributions
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [0.9.0-beta.10](https://github.com/xmldom/xmldom/compare/0.9.0-beta.9...0.9.0-beta.10)
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- dom: prevent iteration over deleted items [`#514`](https://github.com/xmldom/xmldom/pull/514)/ [`#499`](https://github.com/xmldom/xmldom/issues/499)
|
|
28
|
+
|
|
29
|
+
### Chore
|
|
30
|
+
|
|
31
|
+
- use prettier plugin for jsdoc [`#513`](https://github.com/xmldom/xmldom/pull/513)
|
|
32
|
+
|
|
33
|
+
Thank you, [@qtow](https://github.com/qtow), [@shunkica](https://github.com/shunkica), [@homer0](https://github.com/homer0), for your contributions
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [0.8.10](https://github.com/xmldom/xmldom/compare/0.8.9...0.8.10)
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- dom: prevent iteration over deleted items [`#514`](https://github.com/xmldom/xmldom/pull/514)/ [`#499`](https://github.com/xmldom/xmldom/issues/499)
|
|
41
|
+
|
|
42
|
+
Thank you, [@qtow](https://github.com/qtow), for your contributions
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [0.7.13](https://github.com/xmldom/xmldom/compare/0.7.12...0.7.13)
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- dom: prevent iteration over deleted items [`#514`](https://github.com/xmldom/xmldom/pull/514)/ [`#499`](https://github.com/xmldom/xmldom/issues/499)
|
|
50
|
+
|
|
51
|
+
Thank you, [@qtow](https://github.com/qtow), for your contributions
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [0.9.0-beta.9](https://github.com/xmldom/xmldom/compare/0.9.0-beta.8...0.9.0-beta.9)
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- Set nodeName property in ProcessingInstruction [`#509`](https://github.com/xmldom/xmldom/pull/509) / [`#505`](https://github.com/xmldom/xmldom/issues/505)
|
|
59
|
+
- preserve DOCTYPE internal subset [`#498`](https://github.com/xmldom/xmldom/pull/498) / [`#497`](https://github.com/xmldom/xmldom/pull/497) / [`#117`](https://github.com/xmldom/xmldom/issues/117)\
|
|
60
|
+
BREAKING CHANGES: Many documents that were previously accepted by xmldom, esecially non well-formed ones are no longer accepted. Some issues that were formerly reported as errors are now a fatalError.
|
|
61
|
+
- DOMParser: Align parseFromString errors with specs [`#454`](https://github.com/xmldom/xmldom/pull/454)
|
|
62
|
+
|
|
63
|
+
### Chore
|
|
64
|
+
|
|
65
|
+
- stop running mutation tests using stryker [`#496`](https://github.com/xmldom/xmldom/pull/496)
|
|
66
|
+
- make `toErrorSnapshot` windows compatible [`#503`](https://github.com/xmldom/xmldom/pull/503)
|
|
67
|
+
|
|
68
|
+
Thank you, [@cjbarth](https://github.com/cjbarth), [@shunkica](https://github.com/shunkica), [@pmahend1](https://github.com/pmahend1), [@niklasl](https://github.com/niklasl), for your contributions
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [0.8.9](https://github.com/xmldom/xmldom/compare/0.8.8...0.8.9)
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
|
|
75
|
+
- Set nodeName property in ProcessingInstruction [`#509`](https://github.com/xmldom/xmldom/pull/509) / [`#505`](https://github.com/xmldom/xmldom/issues/505)
|
|
76
|
+
|
|
77
|
+
Thank you, [@cjbarth](https://github.com/cjbarth), for your contributions
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## [0.7.12](https://github.com/xmldom/xmldom/compare/0.7.11...0.7.12)
|
|
81
|
+
|
|
82
|
+
### Fixed
|
|
83
|
+
|
|
84
|
+
- Set nodeName property in ProcessingInstruction [`#509`](https://github.com/xmldom/xmldom/pull/509) / [`#505`](https://github.com/xmldom/xmldom/issues/505)
|
|
85
|
+
|
|
86
|
+
Thank you, [@cjbarth](https://github.com/cjbarth), for your contributions
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## [0.9.0-beta.8](https://github.com/xmldom/xmldom/compare/0.9.0-beta.7...0.9.0-beta.8)
|
|
90
|
+
|
|
91
|
+
### Fixed
|
|
92
|
+
|
|
93
|
+
- Throw DOMException when calling removeChild with invalid parameter [`#494`](https://github.com/xmldom/xmldom/pull/494) / [`#135`](https://github.com/xmldom/xmldom/issues/135)
|
|
94
|
+
|
|
95
|
+
BREAKING CHANGE: Previously it was possible (but not documented) to call `Node.removeChild` with any node in the tree,
|
|
96
|
+
and with certain exceptions, it would work. This is no longer the case: calling `Node.removeChild` with an argument that is not a direct child of the node that it is called from, will throw a NotFoundError DOMException, as it is described by the specs.
|
|
97
|
+
|
|
98
|
+
Thank you, [@noseworthy](https://github.com/noseworthy), [@davidmc24](https://github.com/davidmc24), for your contributions
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## [0.9.0-beta.7](https://github.com/xmldom/xmldom/compare/0.9.0-beta.6...0.9.0-beta.7)
|
|
102
|
+
|
|
103
|
+
### Feature
|
|
104
|
+
|
|
105
|
+
- Add `compareDocumentPosition` method from level 3 spec. [`#488`](https://github.com/xmldom/xmldom/pull/488)
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
|
|
109
|
+
- `getAttribute` and `getAttributeNS` should return `null` (#477) [`#46`](https://github.com/xmldom/xmldom/issues/46)
|
|
110
|
+
- several issues in NamedNodeMap and Element (#482) [`#46`](https://github.com/xmldom/xmldom/issues/46)
|
|
111
|
+
- properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
|
|
112
|
+
- extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
|
|
113
|
+
|
|
114
|
+
BREAKING CHANGE: Iteration over attributes now happens in the right order and non-existing attributes now return `null` instead of undefined. THe same is true for the `namepsaceURI` and `prefix` of Attr nodes.
|
|
115
|
+
All of the changes are fixing misalignment with the DOM specs, so if you expected it to work as specified,
|
|
116
|
+
nothing should break for you.
|
|
117
|
+
|
|
118
|
+
### Chore
|
|
119
|
+
|
|
120
|
+
- update multiple devDependencies
|
|
121
|
+
- Configure jest (correctly) and wallaby [`#481`](https://github.com/xmldom/xmldom/pull/481) / [`#483`](https://github.com/xmldom/xmldom/pull/483)
|
|
122
|
+
|
|
123
|
+
Thank you, [@bulandent](https://github.com/bulandent), [@zorkow](https://github.com/zorkow), for your contributions
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## [0.8.8](https://github.com/xmldom/xmldom/compare/0.8.7...0.8.8)
|
|
127
|
+
|
|
128
|
+
### Fixed
|
|
129
|
+
|
|
130
|
+
- extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
|
|
131
|
+
|
|
132
|
+
Thank you, [@zorkow](https://github.com/zorkow), for your contributions
|
|
133
|
+
|
|
134
|
+
## [0.7.11](https://github.com/xmldom/xmldom/compare/0.7.10...0.7.11)
|
|
135
|
+
|
|
136
|
+
### Fixed
|
|
137
|
+
|
|
138
|
+
- extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
|
|
139
|
+
|
|
140
|
+
Thank you, [@zorkow](https://github.com/zorkow), for your contributions
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
## [0.8.7](https://github.com/xmldom/xmldom/compare/0.8.6...0.8.7)
|
|
144
|
+
|
|
145
|
+
### Fixed
|
|
146
|
+
|
|
147
|
+
- properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
|
|
148
|
+
|
|
149
|
+
Thank you, [@bulandent](https://github.com/bulandent), for your contributions
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [0.7.10](https://github.com/xmldom/xmldom/compare/0.7.9...0.7.10)
|
|
153
|
+
|
|
154
|
+
### Fixed
|
|
155
|
+
|
|
156
|
+
- properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
|
|
157
|
+
|
|
158
|
+
Thank you, [@bulandent](https://github.com/bulandent), for your contributions
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## [0.8.6](https://github.com/xmldom/xmldom/compare/0.8.5...0.8.6)
|
|
162
|
+
|
|
163
|
+
### Fixed
|
|
164
|
+
|
|
165
|
+
- Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455) / [`#456`](https://github.com/xmldom/xmldom/issues/456)
|
|
166
|
+
|
|
167
|
+
Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## [0.7.9](https://github.com/xmldom/xmldom/compare/0.7.8...0.7.9)
|
|
171
|
+
|
|
172
|
+
### Fixed
|
|
173
|
+
|
|
174
|
+
- Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455) / [`#456`](https://github.com/xmldom/xmldom/issues/456)
|
|
175
|
+
|
|
176
|
+
Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
## [0.9.0-beta.6](https://github.com/xmldom/xmldom/compare/0.9.0-beta.5...0.9.0-beta.6)
|
|
180
|
+
|
|
181
|
+
### Fixed
|
|
182
|
+
|
|
183
|
+
- Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455) / [`#456`](https://github.com/xmldom/xmldom/issues/456)
|
|
184
|
+
|
|
185
|
+
Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## [0.9.0-beta.5](https://github.com/xmldom/xmldom/compare/0.9.0-beta.4...0.9.0-beta.5)
|
|
189
|
+
|
|
190
|
+
### Fixed
|
|
191
|
+
|
|
192
|
+
- fix: Restore ES5 compatibility [`#452`](https://github.com/xmldom/xmldom/pull/452) / [`#453`](https://github.com/xmldom/xmldom/issues/453)
|
|
193
|
+
|
|
194
|
+
Thank you, [@fengxinming](https://github.com/fengxinming), for your contributions
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
## [0.8.5](https://github.com/xmldom/xmldom/compare/0.8.4...0.8.5)
|
|
198
|
+
|
|
199
|
+
### Fixed
|
|
200
|
+
|
|
201
|
+
- fix: Restore ES5 compatibility [`#452`](https://github.com/xmldom/xmldom/pull/452) / [`#453`](https://github.com/xmldom/xmldom/issues/453)
|
|
202
|
+
|
|
203
|
+
Thank you, [@fengxinming](https://github.com/fengxinming), for your contributions
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## [0.7.8](https://github.com/xmldom/xmldom/compare/0.7.7...0.7.8)
|
|
207
|
+
|
|
208
|
+
### Fixed
|
|
209
|
+
|
|
210
|
+
- fix: Restore ES5 compatibility [`#452`](https://github.com/xmldom/xmldom/pull/452) / [`#453`](https://github.com/xmldom/xmldom/issues/453)
|
|
211
|
+
|
|
212
|
+
Thank you, [@fengxinming](https://github.com/fengxinming), for your contributions
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
## [0.9.0-beta.4](https://github.com/xmldom/xmldom/compare/0.9.0-beta.3...0.9.0-beta.4)
|
|
216
|
+
|
|
217
|
+
### Fixed
|
|
218
|
+
|
|
219
|
+
- Security: Prevent inserting DOM nodes when they are not well-formed [`CVE-2022-39353`](https://github.com/xmldom/xmldom/security/advisories/GHSA-crh6-fp67-6883)
|
|
220
|
+
In case such a DOM would be created, the part that is not well-formed will be transformed into text nodes, in which xml specific characters like `<` and `>` are encoded accordingly.
|
|
221
|
+
In the upcoming version 0.9.0 those text nodes will no longer be added and an error will be thrown instead.
|
|
222
|
+
This change can break your code, if you relied on this behavior, e.g. multiple root elements in the past. We consider it more important to align with the specs that we want to be aligned with, considering the potential security issues that might derive from people not being aware of the difference in behavior.
|
|
223
|
+
Related Spec: <https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity>
|
|
224
|
+
|
|
225
|
+
### Chore
|
|
226
|
+
|
|
227
|
+
- update multiple devDependencies
|
|
228
|
+
- Add eslint-plugin-node for `lib` [`#448`](https://github.com/xmldom/xmldom/pull/448) / [`#190`](https://github.com/xmldom/xmldom/issues/190)
|
|
229
|
+
- style: Apply prettier to all code [`#447`](https://github.com/xmldom/xmldom/pull/447) / [`#29`](https://github.com/xmldom/xmldom/issues/29) / [`#130`](https://github.com/xmldom/xmldom/issues/130)
|
|
230
|
+
|
|
231
|
+
Thank you, [@XhmikosR](https://github.com/XhmikosR), [@awwright](https://github.com/awwright), [@frumioj](https://github.com/frumioj), [@cjbarth](https://github.com/cjbarth), [@markgollnick](https://github.com/markgollnick) for your contributions
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## [0.8.4](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.4)
|
|
235
|
+
|
|
236
|
+
### Fixed
|
|
237
|
+
|
|
238
|
+
- Security: Prevent inserting DOM nodes when they are not well-formed [`CVE-2022-39353`](https://github.com/xmldom/xmldom/security/advisories/GHSA-crh6-fp67-6883)
|
|
239
|
+
In case such a DOM would be created, the part that is not well-formed will be transformed into text nodes, in which xml specific characters like `<` and `>` are encoded accordingly.
|
|
240
|
+
In the upcoming version 0.9.0 those text nodes will no longer be added and an error will be thrown instead.
|
|
241
|
+
This change can break your code, if you relied on this behavior, e.g. multiple root elements in the past. We consider it more important to align with the specs that we want to be aligned with, considering the potential security issues that might derive from people not being aware of the difference in behavior.
|
|
242
|
+
Related Spec: <https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity>
|
|
243
|
+
|
|
244
|
+
Thank you, [@frumioj](https://github.com/frumioj), [@cjbarth](https://github.com/cjbarth), [@markgollnick](https://github.com/markgollnick) for your contributions
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
## [0.7.7](https://github.com/xmldom/xmldom/compare/0.7.6...0.7.7)
|
|
248
|
+
|
|
249
|
+
### Fixed
|
|
250
|
+
|
|
251
|
+
- Security: Prevent inserting DOM nodes when they are not well-formed [`CVE-2022-39353`](https://github.com/xmldom/xmldom/security/advisories/GHSA-crh6-fp67-6883)
|
|
252
|
+
In case such a DOM would be created, the part that is not well-formed will be transformed into text nodes, in which xml specific characters like `<` and `>` are encoded accordingly.
|
|
253
|
+
In the upcoming version 0.9.0 those text nodes will no longer be added and an error will be thrown instead.
|
|
254
|
+
This change can break your code, if you relied on this behavior, e.g. multiple root elements in the past. We consider it more important to align with the specs that we want to be aligned with, considering the potential security issues that might derive from people not being aware of the difference in behavior.
|
|
255
|
+
Related Spec: <https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity>
|
|
256
|
+
|
|
257
|
+
Thank you, [@frumioj](https://github.com/frumioj), [@cjbarth](https://github.com/cjbarth), [@markgollnick](https://github.com/markgollnick) for your contributions
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
## [0.9.0-beta.3](https://github.com/xmldom/xmldom/compare/0.9.0-beta.2...0.9.0-beta.3)
|
|
261
|
+
|
|
262
|
+
### Fixed
|
|
263
|
+
|
|
264
|
+
- fix: Stop adding tags after incomplete closing tag [`#445`](https://github.com/xmldom/xmldom/pull/445) / [`#416`](https://github.com/xmldom/xmldom/pull/416)
|
|
265
|
+
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.
|
|
266
|
+
BREAKING CHANGE: If your code relied on not well-formed XML to be parsed and include subsequent tags, this will no longer work.
|
|
267
|
+
- fix: Avoid bidirectional characters in source code [`#440`](https://github.com/xmldom/xmldom/pull/440)
|
|
268
|
+
|
|
269
|
+
### Other
|
|
270
|
+
|
|
271
|
+
- ci: Add CodeQL scan [`#444`](https://github.com/xmldom/xmldom/pull/444)
|
|
272
|
+
|
|
273
|
+
Thank you, [@ACN-kck](https://github.com/ACN-kck), [@mgerlach](https://github.com/mgerlach) for your contributions
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
## [0.7.6](https://github.com/xmldom/xmldom/compare/0.7.5...0.7.6)
|
|
277
|
+
|
|
278
|
+
### Fixed
|
|
279
|
+
- 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)
|
|
280
|
+
|
|
281
|
+
Thank you, [@jftanner](https://github.com/jftanner), [@Supraja9726](https://github.com/Supraja9726) for your contributions
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
## [0.8.3](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.2)
|
|
285
|
+
|
|
286
|
+
### Fixed
|
|
287
|
+
- Avoid iterating over prototype properties [`#437`](https://github.com/xmldom/xmldom/pull/437) / [`#436`](https://github.com/xmldom/xmldom/issues/436)
|
|
288
|
+
|
|
289
|
+
Thank you, [@Supraja9726](https://github.com/Supraja9726) for your contributions
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
## [0.9.0-beta.2](https://github.com/xmldom/xmldom/compare/0.9.0-beta.1...0.9.0-beta.2)
|
|
293
|
+
|
|
294
|
+
### Fixed
|
|
295
|
+
- Avoid iterating over prototype properties [`#437`](https://github.com/xmldom/xmldom/pull/437) / [`#436`](https://github.com/xmldom/xmldom/issues/436)
|
|
296
|
+
|
|
297
|
+
Thank you, [@Supraja9726](https://github.com/Supraja9726) for your contributions
|
|
298
|
+
|
|
299
|
+
|
|
7
300
|
## [0.9.0-beta.1](https://github.com/xmldom/xmldom/compare/0.8.2...0.9.0-beta.1)
|
|
8
301
|
|
|
9
302
|
### Fixed
|
|
@@ -47,6 +340,7 @@ Thank you [@weiwu-zhang](https://github.com/weiwu-zhang) for your contributions
|
|
|
47
340
|
|
|
48
341
|
- update multiple devDependencies
|
|
49
342
|
|
|
343
|
+
|
|
50
344
|
## [0.8.2](https://github.com/xmldom/xmldom/compare/0.8.1...0.8.2)
|
|
51
345
|
|
|
52
346
|
### Fixed
|
|
@@ -102,7 +396,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
|
|
102
396
|
### Fixes:
|
|
103
397
|
|
|
104
398
|
- Preserve default namespace when serializing [`#319`](https://github.com/xmldom/xmldom/issues/319) / [`#321`](https://github.com/xmldom/xmldom/pull/321)
|
|
105
|
-
Thank you [@lupestro](https://github.com/lupestro)
|
|
399
|
+
Thank you, [@lupestro](https://github.com/lupestro)
|
|
106
400
|
|
|
107
401
|
## 0.7.4
|
|
108
402
|
|
|
@@ -111,7 +405,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
|
|
111
405
|
### Fixes:
|
|
112
406
|
|
|
113
407
|
- Restore ability to parse `__prototype__` attributes [`#315`](https://github.com/xmldom/xmldom/pull/315)
|
|
114
|
-
Thank you [@dsimpsonOMF](https://github.com/dsimpsonOMF)
|
|
408
|
+
Thank you, [@dsimpsonOMF](https://github.com/dsimpsonOMF)
|
|
115
409
|
|
|
116
410
|
## 0.7.3
|
|
117
411
|
|
|
@@ -121,7 +415,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
|
|
121
415
|
|
|
122
416
|
- Add doctype when parsing from string [`#277`](https://github.com/xmldom/xmldom/issues/277) / [`#301`](https://github.com/xmldom/xmldom/pull/301)
|
|
123
417
|
- Correct typo in error message [`#294`](https://github.com/xmldom/xmldom/pull/294)
|
|
124
|
-
Thank you [@rrthomas](https://github.com/rrthomas)
|
|
418
|
+
Thank you, [@rrthomas](https://github.com/rrthomas)
|
|
125
419
|
|
|
126
420
|
### Refactor:
|
|
127
421
|
|
|
@@ -146,7 +440,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
|
|
146
440
|
### Fixes:
|
|
147
441
|
|
|
148
442
|
- Types: Add index.d.ts to packaged files [`#288`](https://github.com/xmldom/xmldom/pull/288)
|
|
149
|
-
Thank you [@forty](https://github.com/forty)
|
|
443
|
+
Thank you, [@forty](https://github.com/forty)
|
|
150
444
|
|
|
151
445
|
## 0.7.1
|
|
152
446
|
|
|
@@ -155,7 +449,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
|
|
155
449
|
### Fixes:
|
|
156
450
|
|
|
157
451
|
- Types: Copy types from DefinitelyTyped [`#283`](https://github.com/xmldom/xmldom/pull/283)
|
|
158
|
-
Thank you [@kachkaev](https://github.com/kachkaev)
|
|
452
|
+
Thank you, [@kachkaev](https://github.com/kachkaev)
|
|
159
453
|
|
|
160
454
|
### Chore:
|
|
161
455
|
- package.json: remove author, maintainers, etc. [`#279`](https://github.com/xmldom/xmldom/pull/279)
|
|
@@ -172,7 +466,7 @@ For more details look at [`#278`](https://github.com/xmldom/xmldom/pull/278#issu
|
|
|
172
466
|
### Fixes:
|
|
173
467
|
|
|
174
468
|
- Security: Misinterpretation of malicious XML input [`CVE-2021-32796`](https://github.com/xmldom/xmldom/security/advisories/GHSA-5fg8-2547-mr8q)
|
|
175
|
-
- Implement `Document.getElementsByClassName` as specified [`#213`](https://github.com/xmldom/xmldom/pull/213), thank you [@ChALkeR](https://github.com/ChALkeR)
|
|
469
|
+
- Implement `Document.getElementsByClassName` as specified [`#213`](https://github.com/xmldom/xmldom/pull/213), thank you, [@ChALkeR](https://github.com/ChALkeR)
|
|
176
470
|
- Inherit namespace prefix from parent when required [`#268`](https://github.com/xmldom/xmldom/pull/268)
|
|
177
471
|
- Handle whitespace in closing tags [`#267`](https://github.com/xmldom/xmldom/pull/267)
|
|
178
472
|
- Update `DOMImplementation` according to recent specs [`#210`](https://github.com/xmldom/xmldom/pull/210)
|
|
@@ -180,7 +474,7 @@ For more details look at [`#278`](https://github.com/xmldom/xmldom/pull/278#issu
|
|
|
180
474
|
- No longer serializes any namespaces with an empty URI [`#244`](https://github.com/xmldom/xmldom/pull/244)
|
|
181
475
|
(related to [`#168`](https://github.com/xmldom/xmldom/pull/168) released in 0.6.0)
|
|
182
476
|
BREAKING CHANGE: Only if you rely on ["unsetting" a namespace prefix](https://github.com/xmldom/xmldom/pull/168#issuecomment-886984994) by setting it to an empty string
|
|
183
|
-
- Set `localName` as part of `Document.createElement` [`#229`](https://github.com/xmldom/xmldom/pull/229), thank you [@rrthomas](https://github.com/rrthomas)
|
|
477
|
+
- Set `localName` as part of `Document.createElement` [`#229`](https://github.com/xmldom/xmldom/pull/229), thank you, [@rrthomas](https://github.com/rrthomas)
|
|
184
478
|
|
|
185
479
|
### CI
|
|
186
480
|
|
|
@@ -199,7 +493,7 @@ For more details look at [`#278`](https://github.com/xmldom/xmldom/pull/278#issu
|
|
|
199
493
|
|
|
200
494
|
- Stop serializing empty namespace values like `xmlns:ds=""` [`#168`](https://github.com/xmldom/xmldom/pull/168)
|
|
201
495
|
BREAKING CHANGE: If your code expected empty namespaces attributes to be serialized.
|
|
202
|
-
Thank you [@pdecat](https://github.com/pdecat) and [@FranckDepoortere](https://github.com/FranckDepoortere)
|
|
496
|
+
Thank you, [@pdecat](https://github.com/pdecat) and [@FranckDepoortere](https://github.com/FranckDepoortere)
|
|
203
497
|
- Escape `<` to `<` when serializing attribute values [`#198`](https://github.com/xmldom/xmldom/issues/198) / [`#199`](https://github.com/xmldom/xmldom/pull/199)
|
|
204
498
|
|
|
205
499
|
## 0.5.0
|
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).
|