-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Floki.parse differs when using html5ever #236
Comments
@andyleclair Thank you for opening the issue. This is a problem that we have because we don't consider parsing fragments as something different, when we should. html5ever's parses fragments as full documents because we (floki) don't distinguish this when calling it. I'm planning to add a This should be fixed once I finish the work on the internal parser (#204). |
I see that this report got closed. Was there any resolution? We are currently handling the specific case of a fragment wrapped in the default wrapper, but I'd love to tear that code out |
@andyleclair it was not fixed. It's a known issue. I kept the issue fixed in the issues list, but I will let it open too. |
Is it really a problem from floki? After reading code I start to think it's from html5ever_elixir. |
Description
Mochiweb Floki will produce different output than html5ever, namely, the output of
Floki.parse
will be wrapped in<html><head></head><body>...</body></html>
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'd expect that the output would match the the output of calling this without the html5ever parser, namely, that it'd just be the fragments themselves.
The text was updated successfully, but these errors were encountered: