-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sanitizeHtml throws TypeError on '&' symbol #606
Comments
Hi @matejfalat, |
Yes, what we would ask is that you contribute a PR with a failing unit test to this repo so we can see how this is possible in the context of this project and avoid any confusion with issues that might only exist in a larger project with parts that aren't actually dependencies of the module etc. htmlparser2 is a dependency so browser or no, a bug coming from that should be reproducible in a test. |
probably because of missing ";" at the end |
On Node.js CLI:
Just tested this and it works good on both of these:
Might be worth adding a test case. My two cents. Thank you. PS: Found these related: fb55/htmlparser2#1426 & fb55/htmlparser2#1460 |
To Reproduce
Step by step instructions to reproduce the behavior:
Expected behavior
Not to crash.
Describe the bug
When the html text contains the ampersand symbol, the
sanitizeHtml()
is failing with:Details
React: 18.2.0,
Webpack: 5.75.0
Version of Node.js:
v18.13.0
Server Operating System:
Windows 11, WSL2, and Docker
Screenshots
The text was updated successfully, but these errors were encountered: