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: make manually inserted script tag, spec compliant. #749

Merged
merged 5 commits into from
Mar 26, 2024
Merged

fix: make manually inserted script tag, spec compliant. #749

merged 5 commits into from
Mar 26, 2024

Conversation

airblast-dev
Copy link
Contributor

@airblast-dev airblast-dev commented Mar 23, 2024

According to the HTML spec for the script tag "Neither tag is omissible." this means we must use opening and closing tags. While using nipper this mistake was silently corrected, so this is only coming up now.

The behaviour of lol_html's rewriter, is HTML spec compliant. Script tags that are inserted after an element without a closing tag, are not detected by lol_html. Meaning any modifications that are made, don't actually get applied.

All of the examples in the repository are spec compliant with the HTML script tag, however the example script tags in trunk.rs are considered invalid by lol_html, and incorrect by the HTML spec. The script tags on the site should also be corrected.

This fixes the issues mentioned in: #742 (comment)

@airblast-dev airblast-dev marked this pull request as draft March 23, 2024 16:18
@airblast-dev airblast-dev changed the title fix: make manually inserted HTML, spec compliant. fix: make manually inserted script tag, spec compliant. Mar 23, 2024
@airblast-dev airblast-dev marked this pull request as ready for review March 23, 2024 17:29
@airblast-dev airblast-dev marked this pull request as draft March 23, 2024 18:34
@airblast-dev airblast-dev marked this pull request as ready for review March 23, 2024 18:35
@ctron ctron merged commit ad94a69 into trunk-rs:main Mar 26, 2024
46 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.

2 participants