-
Notifications
You must be signed in to change notification settings - Fork 59
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
7 tests assume non-compliant step-order in foreign content #173
Comments
Assuming all browsers pass these tests, this is probably best reported as a bug against the standard at this point. |
Oh yeah ... I should have noted that the only thing that changes if you do it in the order described as in the spec you get one parser error more ... I'll make a PR to the spec. |
not-my-profile
added a commit
to not-my-profile/html
that referenced
this issue
Sep 29, 2023
I have tested this change against the test cases from html5lib-tests. In document parsing this doesn't change any test results. In fragment parsing this fixes 7 test cases by reporting one parser error less. (That is all existing HTML parsers that pass html5lib-tests must have already implemented these steps in the order they are changed to by this commit.) The test cases where one error is reported less fall in two categories: * fragment parsing e.g. `<svg></table>` with a `tbody` HTML element as the context element => one "unexpected end tag" error is reported less * fragment parsing e.g. `<g></path>` with a `path` SVG element as the context element => one "found special tag while closing generic tag" error is no longer reported Fixes html5lib/html5lib-tests#173.
not-my-profile
added a commit
to not-my-profile/html
that referenced
this issue
Sep 29, 2023
I have tested this change against the test cases from html5lib-tests. In document parsing this doesn't change any test results. In fragment parsing this fixes 7 test cases by reporting one parser error less. (That is all existing HTML parsers that pass html5lib-tests must have already implemented these steps in the order they are changed to by this commit.) The test cases where one error is reported less fall in two categories: * fragment parsing e.g. `<svg></table>` with a `tbody` HTML element as the context element => one "unexpected end tag" error is reported less (previously it was reported twice) * fragment parsing e.g. `<g></path>` with a `path` SVG element as the context element => one "found special tag while closing generic tag" error is no longer reported Fixes html5lib/html5lib-tests#173.
not-my-profile
added a commit
to not-my-profile/html
that referenced
this issue
Sep 29, 2023
I have tested this change against the test cases from html5lib-tests. In document parsing this doesn't change any test results. In fragment parsing this fixes 7 test cases by reporting one parser error less. (That is all existing HTML parsers that pass html5lib-tests must have already implemented these steps in the order they are changed to by this commit.) The test cases where one error is reported less fall in two categories: * fragment parsing e.g. `<svg></table>` with a `tbody` HTML element as the context element => one "unexpected end tag" error is reported less (previously it was reported twice) * fragment parsing e.g. `<g></path>` with a `path` SVG element as the context element => one "found special tag while closing generic tag" error is no longer reported Fixes html5lib/html5lib-tests#173.
not-my-profile
added a commit
to not-my-profile/html
that referenced
this issue
Sep 29, 2023
I have tested this change against the test cases from html5lib-tests. In document parsing this doesn't change any test results. In fragment parsing this fixes 7 test cases by reporting one parser error less. (That is all existing HTML parsers that pass html5lib-tests must have already implemented these steps in the order they are changed to by this commit.) The test cases where one error is reported less fall in two categories: * fragment parsing e.g. `<svg></table>` with a `tbody` HTML element as the context element => one "unexpected end tag" error is reported less (previously it was reported twice) * fragment parsing e.g. `<g></path>` with a `path` SVG element as the context element => one "found special tag while closing generic tag" error is no longer reported Fixes html5lib/html5lib-tests#173.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The rules for parsing tokens in foreign content currently say:
However if you actually implement that 7 tree-construction test cases of this repository fail:
Apparently the test cases assume that the 7th step is performed as step 4.
The text was updated successfully, but these errors were encountered: