Skip to content
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

Empty tag attributes are not parsed correctly #558

Open
1player opened this issue Apr 4, 2024 · 1 comment
Open

Empty tag attributes are not parsed correctly #558

1player opened this issue Apr 4, 2024 · 1 comment
Labels

Comments

@1player
Copy link

1player commented Apr 4, 2024

iex(4)> Floki.parse_document("<a href></a>")
{:ok, [{"a", [{"href", "href"}], []}]}

Floki interprets this example as if it was <a href="href"> which is of course wrong. I would expect either Floki to represent the empty attribute as an empty string, or to omit it altogether.

@1player 1player added the Bug label Apr 4, 2024
@1player
Copy link
Author

1player commented Apr 4, 2024

Does not seem to affect fast_html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant