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: README.md
+14-6
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,11 @@ $ yarn add html-react-parser
56
56
Import the module:
57
57
58
58
```js
59
-
// CommonJS
60
-
constparse=require('html-react-parser');
61
-
62
59
// ES Modules
63
60
importparsefrom'html-react-parser';
61
+
62
+
// CommonJS
63
+
constparse=require('html-react-parser');
64
64
```
65
65
66
66
Parse single element:
@@ -228,19 +228,27 @@ parse('<br>', {
228
228
229
229
#### Is this library XSS safe?
230
230
231
-
No, this library is **_not_**[XSS (Cross-Site Scripting)](https://wikipedia.org/wiki/Cross-site_scripting) safe. See [#94](https://github.com/remarkablemark/html-react-parser/issues/94).
231
+
No, this library is _**not**_[XSS (cross-site scripting)](https://wikipedia.org/wiki/Cross-site_scripting) safe. See [#94](https://github.com/remarkablemark/html-react-parser/issues/94).
232
232
233
233
#### Does this library sanitize invalid HTML?
234
234
235
-
No, this library does **_not_** perform HTML sanitization. See [#124](https://github.com/remarkablemark/html-react-parser/issues/124).
235
+
No, this library does _**not**_ perform HTML sanitization. See [#124](https://github.com/remarkablemark/html-react-parser/issues/124) and [#125](https://github.com/remarkablemark/html-react-parser/issues/125).
236
236
237
237
#### Are `<script>` tags parsed?
238
238
239
239
Although `<script>` tags and their contents are rendered on the server-side, they're not evaluated on the client-side. See [#98](https://github.com/remarkablemark/html-react-parser/issues/98).
240
240
241
241
#### Why aren't my HTML attributes getting called?
242
242
243
-
This is because [inline event handlers](https://developer.mozilla.org/docs/Web/Guide/Events/Event_handlers) (e.g., `onclick`) are parsed as a _string_ instead of a _function_. See [#73](https://github.com/remarkablemark/html-react-parser/issues/73).
243
+
This is because [inline event handlers](https://developer.mozilla.org/docs/Web/Guide/Events/Event_handlers) like `onclick` are parsed as a _string_ instead of a _function_. See [#73](https://github.com/remarkablemark/html-react-parser/issues/73).
244
+
245
+
#### The parser throws an error.
246
+
247
+
Check if your arguments are valid. Also, see ["Does this library sanitize invalid HTML?"](https://github.com/remarkablemark/html-react-parser#does-this-library-sanitize-invalid-html).
248
+
249
+
#### Does this library support SSR?
250
+
251
+
Yes, this library supports server-side rendering on Node.js. See [demo](https://repl.it/@remarkablemark/html-react-parser-SSR).
0 commit comments