-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
ability to use htmlparser2 xmlMode #158
Comments
The reason the nesting is wrong is because the self-closing syntax ( <div class="wp-playlist-next"/>
<div class="wp-playlist-prev"/> I recommend validating your HTML markup and updating your JSFiddle. I would also recommend testing your input by rendering the markup server-side. See example. Question: are you using |
I am using it server side (gatsby) for rewriting the html received from wordpress. This markup is generated by wordpress if you create an audio playlist. Note that I ran this code through html sanitizers (see #124) and they did not change those tags. |
I reviewed your repl.it and updated mine, but the nesting is still wrong. I understand that your point is that this is invalid HTML and I should change it but I wont be able to change what wordpress is giving me. I have validated that when using |
Please review #161 |
looks great! |
Published 0.12.0: npm: npm i -S [email protected] yarn:
|
Expected Behavior
valid xhtml should be properly parsed. For that to work with
htmlparser2
you need to passActual Behavior
nesting is all wrong
Steps to Reproduce
try to parse a more complicated xhtml snippet that contains scripts, noscript, comments and html5 audio tags
Reproducible Demo
https://repl.it/@rburgst/html-react-parser
Environment
The text was updated successfully, but these errors were encountered: