You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Protectator There might not be an easy way to support parsing invalid self-closing tags on the client-side since we're using html-dom-parser, which relies on the native DOM parser.
If you're not using the replace option, my recommendation is to sanitize the HTML string and using React's dangerouslySetInnerHTML.
Description
When parsing in elements like [<div /><div />, <path /><path />, etc] causes the program to nest the elements instead of placing them as siblings.
What should happen
html = "<path /><path />"
parse(html) = <path /><path /> OR <path></path><path></path>
What happens instead
html = "<path /><path />"
parse(html) = <path><path><path /><path />
Steps to Reproduce
Parse in any self closing tags back to back, the error doesn't happen when parsing a single tag only multiple in succession.
The text was updated successfully, but these errors were encountered: