Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ensure validateDOMNesting catches nested body elements #6469

Merged
merged 1 commit into from
Apr 15, 2016

Conversation

keyz
Copy link
Contributor

@keyz keyz commented Apr 9, 2016

This commit fixes #6280.

Instead of adding a new list of rules to handle foreignObject, I think the actual problem is that we don't have a clause that handles another body in "in body" parsing mode (e.g., pass this html snippet to the W3C validator to see the error message: "Start tag body seen but an element of the same type was already open").

Thanks for reviewing! I could be totally wrong so any feedback is greatly appreciated.

cc @spicyj @toddgeist

@keyz
Copy link
Contributor Author

keyz commented Apr 14, 2016

ping

@sophiebits
Copy link
Collaborator

Yes, I think this seems reasonable. Thank you!

Can you move body to the top so it's still alphabetically sorted?

@jimfb
Copy link
Contributor

jimfb commented Apr 14, 2016

Wait a second... I think this would break full-page rendering. While we generally recommend against FPR, it is a use case that people utilize. We should add a test that rendering <html><body><div /></body><html> won't emit a warning.

@sophiebits
Copy link
Collaborator

@jimfb Line 187 should account for that.

@sophiebits
Copy link
Collaborator

Also line 70 of the test.

@jimfb
Copy link
Contributor

jimfb commented Apr 14, 2016

Oh, ok, I'm good with that.

@sophiebits
Copy link
Collaborator

We do have a test.

@keyz keyz force-pushed the validate-foreignObject-children branch from fa748de to 6cf77ef Compare April 15, 2016 00:15
@facebook-github-bot
Copy link

@keyanzhang updated the pull request.

@keyz
Copy link
Contributor Author

keyz commented Apr 15, 2016

Yep, I fixed the order. Thanks! @jimfb @spicyj

@sophiebits sophiebits merged commit 4016e71 into facebook:master Apr 15, 2016
@keyz keyz deleted the validate-foreignObject-children branch April 15, 2016 01:28
@sophiebits
Copy link
Collaborator

Thanks @keyanzhang!

@zpao zpao modified the milestones: 15.0.x, 15.0.2 Apr 22, 2016
zpao pushed a commit that referenced this pull request Apr 28, 2016
Ensure validateDOMNesting catches nested body elements
(cherry picked from commit 4016e71)
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server Rendering SVG foreignObject body tag w 15rc2 results in missing ID error
5 participants