- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Spurious HTML comments in embedded scripts #759
Labels
bug
Something isn't working
Comments
fcapolini
added a commit
to fcapolini/happy-dom
that referenced
this issue
Feb 16, 2023
fcapolini
added a commit
to fcapolini/happy-dom
that referenced
this issue
Feb 17, 2023
fcapolini
added a commit
to fcapolini/happy-dom
that referenced
this issue
Feb 17, 2023
capricorn86
added a commit
that referenced
this issue
Feb 17, 2023
…ded-scripts #759@patch: Spurious HTML comments in embedded scripts.
Thanks again for your contribution @fcapolini! ⭐ Your fix has been released. You can read more about the release here: |
Perfect, thanks to you! Super quick 💯 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The content of
<script>
and<style>
tags is parsed with the same logic used for all other tags, which considers<!--
,<!
and<?
as HTML comment markers.Because of that this fragment from highlight.js:
is erroneously parsed and is then serialized as:
which breaks the script.
To Reproduce
Expected behavior
In the test code above, the output should preserve the original JS code.
The text was updated successfully, but these errors were encountered: