html-react-parser 1.4.13 → 3.0.0
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/README.md +11 -1
- package/dist/html-react-parser.js +490 -485
- package/dist/html-react-parser.js.map +1 -1
- package/dist/html-react-parser.min.js +1 -1
- package/dist/html-react-parser.min.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +6 -6
- package/lib/attributes-to-props.d.ts +2 -2
- package/lib/attributes-to-props.js +3 -3
- package/lib/dom-to-react.d.ts +3 -3
- package/lib/dom-to-react.js +7 -7
- package/lib/utilities.js +7 -7
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -41,6 +41,8 @@ parse('<p>Hello, World!</p>'); // React.createElement('p', {}, 'Hello, World!')
|
|
|
41
41
|
- [htmlparser2](#htmlparser2)
|
|
42
42
|
- [trim](#trim)
|
|
43
43
|
- [Migration](#migration)
|
|
44
|
+
- [v3.0.0](#v300)
|
|
45
|
+
- [v2.0.0](#v200)
|
|
44
46
|
- [v1.0.0](#v100)
|
|
45
47
|
- [FAQ](#faq)
|
|
46
48
|
- [Is this XSS safe?](#is-this-xss-safe)
|
|
@@ -83,7 +85,7 @@ yarn add html-react-parser
|
|
|
83
85
|
|
|
84
86
|
```html
|
|
85
87
|
<!-- HTMLReactParser depends on React -->
|
|
86
|
-
<script src="https://unpkg.com/react@
|
|
88
|
+
<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
|
|
87
89
|
<script src="https://unpkg.com/html-react-parser@latest/dist/html-react-parser.min.js"></script>
|
|
88
90
|
<script>
|
|
89
91
|
window.HTMLReactParser(/* string */);
|
|
@@ -370,6 +372,14 @@ parse('<p> </p>', { trim: true }); // React.createElement('p')
|
|
|
370
372
|
|
|
371
373
|
## Migration
|
|
372
374
|
|
|
375
|
+
### v3.0.0
|
|
376
|
+
|
|
377
|
+
[domhandler](https://github.com/fb55/domhandler) has been upgraded to v5 so some [parser options](https://github.com/fb55/htmlparser2/wiki/Parser-options) like `normalizeWhitespace` have been removed.
|
|
378
|
+
|
|
379
|
+
### v2.0.0
|
|
380
|
+
|
|
381
|
+
Since [v2.0.0](https://github.com/remarkablemark/html-react-parser/releases/tag/v2.0.0), Internet Explorer (IE) is no longer supported.
|
|
382
|
+
|
|
373
383
|
### v1.0.0
|
|
374
384
|
|
|
375
385
|
TypeScript projects will need to update the types in [v1.0.0](https://github.com/remarkablemark/html-react-parser/releases/tag/v1.0.0).
|