Bad example on front page

This issue has been tracked since 2022-05-04.

There's this example html in README.md

"Xyz <script type='text/javascript'>const foo = '<<bar>>';</ script>"
                                                            ^
                                                            space

... which doesn't really parse correctly in htmlparser2.

If I add anything after that closing tag:

"Xyz <script type='text/javascript'>const foo = '<<bar>>';</ script><p>something</p>"

... the parser will skip it all and attribute everything to <script> tag.

It's a really bad example: I've used it for testing this library and then spent lots of time figuring out why it doesn't work.

Was it supposed to work, or is it just a typo?

fb55 wrote this answer on 2022-05-05

Good catch! PRs welcome 🙂

fb55 wrote this answer on 2022-05-06

This was a typo — I've fixed it in e8832f0. Thanks for the report!

More Details About Repo
Owner Name fb55
Repo Name htmlparser2
Full Name fb55/htmlparser2
Language TypeScript
Created Date 2011-08-27
Updated Date 2023-03-19
Star Count 3793
Watcher Count 50
Fork Count 370
Issue Count 4

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date