You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,21 @@
2
2
3
3
Note: Due to some last quick changes on v4, detail of v4.5.3 & v4.5.4 are not updated here. v4.5.4x is the last tag of v4 in github repository. I'm extremely sorry for the confusion
4
4
5
+
**5.7.0**
6
+
- Use `@nodable/entities` v2.1.0
7
+
- breaking changes
8
+
- single entity scan. You're not allowed to user entity value to form another entity name.
9
+
- you cant add numeric external entity
10
+
- entity error message when expantion limit is crossed might change
11
+
- typings are updated for new options related to process entity
12
+
- please follow documentation of `@nodable/entities` for more detail.
13
+
- performance
14
+
- if processEntities is false, then there should not be impact on performance.
15
+
- if processEntities is true, but you dont pass entity decoder separately then performance may degrade by approx 8-10%
16
+
- if processEntities is true, and you pass entity decoder separately
17
+
- if no entity then performance should be same as before
18
+
- if there are entities then performance should be increased
Copy file name to clipboardExpand all lines: docs/v4, v5/2.XMLparseOptions.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,6 +351,34 @@ Output
351
351
## htmlEntities
352
352
FXP by default parse XML entities if `processEntities: true`. You can set `htmlEntities` to parse HTML entities. Check [entities](./5.Entities.md) section for more information.
353
353
354
+
## entityDecoder
355
+
356
+
`entityDecoder` option is supported v5.7.0 onward. It allows you to set your own entity decoder which supports following methods.
We're not explicitely checking the type and required methods but parser may throw error if the provided object doesn't have the required methods.
369
+
370
+
If XML document has version attribute in xml declaration then it will be passed to `setXmlVersion` method of the decoder to handle NCR gradefully.
371
+
372
+
When `processEntities` is set to `false` then `entityDecoder` will not be used. But if 'true' and `entityDecoder` is not provided then default entity decoder (`@nodable/entities`) will be used.
373
+
374
+
When `entityDecoder` is provided then following options which are set ot parser directly will be ignored. User is expected them to set them in decoder's config.
375
+
- htmlEntities
376
+
- maxTotalExpansions
377
+
- maxExpandedLength
378
+
379
+
380
+
381
+
354
382
## ignoreAttributes
355
383
356
384
By default, `ignoreAttributes` is set to `true`. This means that attributes are ignored by the parser. If you set any configuration related to attributes without setting `ignoreAttributes: false`, it will not have any effect.
In addition, [numeric character references](https://html.spec.whatwg.org/multipage/syntax.html#syntax-charref) are supported - both decimal (`{`) and hexadecimal (`{`).
212
-
213
-
FXP supports reading Notations and Elements from v5.2.1 onwards. However, it doesn't take any action based on these values.
191
+
[Common HTML entities](https://github.com/nodable/val-parsers/blob/main/Entity/src/entities.js#L1152) and numeric (decimal, hex) are supported when `htmlEntities: true`:
214
192
215
193
## External Entities
216
194
@@ -228,4 +206,6 @@ This method also allows you to override default entities.
228
206
229
207
**Note:** External entities added this way bypass DOCTYPE validation but are still subject to the same security limits when `processEntities: true`.
230
208
209
+
You can't set numerical or NCR entities as external entity.
210
+
231
211
[> Next: HTML Document Parsing](./6.HTMLParsing.md)
0 commit comments