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
As you can see, the <link> tag is not properly closed. This causes the parser to put everything after it inside (so, as a child within) the <link> tag and add a "shadow" </link></head><body></body></html> at the end.
This makes it impossible to traverse the DOM.
I'd like to have a way to configure how such cases are handled. Maybe by specifying which tags cannot contain content (auto close tags). Or maybe by changing a setting that causes the parser to automatically close tags once a parent tag has been closed.
Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
Hi there!
I am having trouble parsing some HTML not in my control that contains unclosed tags.
An example:
As you can see, the
<link>
tag is not properly closed. This causes the parser to put everything after it inside (so, as a child within) the<link>
tag and add a "shadow"</link></head><body></body></html>
at the end.This makes it impossible to traverse the DOM.
I'd like to have a way to configure how such cases are handled. Maybe by specifying which tags cannot contain content (auto close tags). Or maybe by changing a setting that causes the parser to automatically close tags once a parent tag has been closed.
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: