Skip to content
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

Parser unescapes &lt;, nodeToString leaves the < as is #19

Open
malidukica opened this issue Jun 30, 2023 · 0 comments
Open

Parser unescapes &lt;, nodeToString leaves the < as is #19

malidukica opened this issue Jun 30, 2023 · 0 comments

Comments

@malidukica
Copy link

malidukica commented Jun 30, 2023

Hello @hecrj, and thank you for the amazing library and work!

The issue that we came across is related to a roundtrip that we do, html string > html parser nodes > html string, since we need to do some adjustments to the html string.

We found out that the parser unescapes a &lt; to <, and stringifying it again leaves < as is (which in turn causes a parsing error when we try to parse the html string anew).

The example is given in the following ellie:

https://ellie-app.com/ndLhBgPfqvDa1

Are there any special considerations for this behaviour? (I'm not a huge expert in html sanitization and escaping)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant