Skip to content

Commit 886e53d

Browse files
docs(readme): update htmlparser2 section and remove decodeEntities
1 parent 1dc24f1 commit 886e53d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,23 +314,21 @@ parse('<br>', {
314314

315315
### htmlparser2
316316

317-
The default [htmlparser2 options](https://github.com/fb55/htmlparser2/wiki/Parser-options) are:
317+
Along with the default [htmlparser2 options](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode), the parser also sets:
318318

319-
```js
319+
```json
320320
{
321-
decodeEntities: true,
322-
lowerCaseAttributeNames: false
321+
"lowerCaseAttributeNames": false
323322
}
324323
```
325324

326325
Since [v0.12.0](https://github.com/remarkablemark/html-react-parser/tree/v0.12.0), the htmlparser2 options can be overridden.
327326

328-
The following example enables [`decodeEntities`](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-decodeentities) and [`xmlMode`](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode):
327+
The following example enables [`xmlMode`](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode) but disables [`lowerCaseAttributeNames`](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-lowercaseattributenames):
329328

330329
```js
331330
parse('<p /><p />', {
332331
htmlparser2: {
333-
decodeEntities: true,
334332
xmlMode: true
335333
}
336334
});

0 commit comments

Comments
 (0)