-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Scan more than the head of the tag stack for tags closing other tags #39
Comments
this bug makes me sad |
PRs welcome :) |
To fix this specific issue, just make p close anchor tags, change this line p: { p: true, a: true } But this may not be the correct thing to do, since, in both chrome and firefox: But they duplicate the anchor like so: <html>
<head></head>
<body>
<p><a href="#">a</a></p>
<p><a href="#">b</a></p>
</body>
</html> |
That's called restoring formatting elements in the HTML spec. Another thing not supported by this parser, as well as attribute propagation, foster parenting, head tag insertion, implicit opening tags etc.. |
Please refer to inikulin/parse5 if you need a spec-compliant parser. |
As described here,
<p><a>a<p>b
is currently handled as<p><a>a<p>b</p></a></p>
.The text was updated successfully, but these errors were encountered: