-
Notifications
You must be signed in to change notification settings - Fork 18
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
HTML.create_element handles void elements incorrectly #66
Comments
delan
changed the title
HTML.create_element handles self-closing tags incorrectly
HTML.create_element handles void elements incorrectly
Aug 9, 2024
I couldn't reproduce this issue with 4.10.
|
Hmm, one idea: does the original page has a doctype that allows void elements, like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following yields
<!DOCTYPE html><img></img><br></br>
. For the <img> this should have no negative effects, but for the <br> this parses as two <br> elements per #parsing-main-inbody of the HTML spec.One workaround to get
<!DOCTYPE html><img><br>
is to use HTML.parse():In some situations, the HTML.parse() needs to be wrapped in a HTML.select_one():
The text was updated successfully, but these errors were encountered: