Skip to content

Commit a41fad2

Browse files
docs(readme): update faq about script parsing and update testing
1 parent 7d806c8 commit a41fad2

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,31 @@ No, this library does **_not_** sanitize against [XSS (Cross-Site Scripting)](ht
184184

185185
#### Are `<script>` tags parsed?
186186

187-
Although `<script>` tags are parsed, [react-dom](https://reactjs.org/docs/react-dom.html) does not render the contents. See [#98](https://github.com/remarkablemark/html-react-parser/issues/98).
187+
No, `<script>` tags are skipped because [react-dom](https://reactjs.org/docs/react-dom.html) does not render the contents. See [#98](https://github.com/remarkablemark/html-react-parser/issues/98).
188188

189189
#### My HTML attributes aren't getting called.
190190

191191
That's because [inline event handlers](https://developer.mozilla.org/docs/Web/Guide/Events/Event_handlers) like `onclick` are parsed as a _string_ rather than a _function_. See [#73](https://github.com/remarkablemark/html-react-parser/issues/73).
192192

193193
## Testing
194194

195+
Run tests:
196+
195197
```sh
196198
$ npm test
197-
$ npm run lint # npm run lint:fix
199+
```
200+
201+
Run tests with coverage:
202+
203+
```sh
204+
$ npm run test:cover
205+
```
206+
207+
Lint files:
208+
209+
```sh
210+
$ npm run lint
211+
$ npm run lint:fix
198212
```
199213

200214
## Benchmarks

0 commit comments

Comments
 (0)