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 incorrect serialization of special characters in raw text elements #1566

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

BenjaminAster
Copy link
Contributor

When raw text elements (e.g. <script>, <style>) get serialized in Happy-DOM, the four special characters &, <, > and U+00A0 NO-BREAK SPACE incorrectly get escaped as &amp;, &lt;, &gt; and &nbsp;. This PR fixes this behavior to match the specification.

@BenjaminAster
Copy link
Contributor Author

Some tests are failing, but they seem to be entirely unrelated to the changes in this PR? The tests ran successfully on my machine.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Owner

@capricorn86 capricorn86 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @BenjaminAster! ⭐

Sorry that it took such a long time to get this in.

@capricorn86 capricorn86 merged commit c80a0e9 into capricorn86:master Nov 6, 2024
3 checks passed
@capricorn86
Copy link
Owner

Some tests are failing, but they seem to be entirely unrelated to the changes in this PR? The tests ran successfully on my machine.

There are some flaky tests that are based on timers. I'm trying to create a list of them and will hopefully fix it soon.

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.

None yet

2 participants