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

fix: fix <noframes> parsing #1277

Merged
merged 2 commits into from
Oct 6, 2024
Merged

Conversation

nolanlawson
Copy link
Contributor

Fixes #972

This also adds a test to make sure that "raw text" tags (e.g. <noembed>, <noframes>, <style>, etc.) all work the same. For the test, I'm reusing the same repro from #972.

Before this fix, all the tests pass except for <noframes> specifically.

expect(b.childNodes[0].nodeName).toBe('#text');
expect((b.childNodes[0] as TextNode).value).toBe('should be outside');
});
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a better place to put this test. For some reason the tests in test/data/html5lib-tests/serializer do not repro the issue.

['style'],
['textarea'],
['title'],
['xmp'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to find all the "raw text" tags I knew of, based on the Firefox source code.

Again, all these tests were already passing except for noframes.

@fb55
Copy link
Collaborator

fb55 commented Sep 30, 2024

Thanks for this @nolanlawson! This also would be a good one to upstream to https://github.com/html5lib/html5lib-tests, which is used to the the majority of spec-compliant HTML parsers.

@43081j
Copy link
Collaborator

43081j commented Oct 6, 2024

are we happy to merge this meanwhile? and open a separate issue to make sure we do add it to the upstream tests eventually

@fb55
Copy link
Collaborator

fb55 commented Oct 6, 2024

@43081j Happy to do so

@43081j 43081j merged commit a4bb1de into inikulin:master Oct 6, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Noframes tag not parsed according to specification when in body
4 participants