html-parser
html-parser copied to clipboard
Parser unescapes <, nodeToString leaves the < as is
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 <
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)