Repository navigation
fix(html): unescape entities in a single pass - #7380
Open
helmipradita wants to merge 1 commit into
Open
helmipradita wants to merge 1 commit into
helmipradita wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7380 +/- ##
==========================================
- Coverage 95.04% 95.02% -0.02%
==========================================
Files 619 619
Lines 52012 51757 -255
Branches 9450 9407 -43
==========================================
- Hits 49434 49183 -251
+ Misses 2031 2022 -9
- Partials 547 552 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
helmipradita
force-pushed
the
fix/html-unescape-multiple-passes
branch
from
November 7, 2026 15:28
f5a74c7 to
c15b607
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7379.
Description
In
@std/html,unescape()previously executed three chainedreplaceAll()passes (named entities, decimal entities, and hex entities). When a string contained an escaped entity such as&#65;or&#x3c;, the first pass replaced&with&, leavingAor<which was then unintentionally decoded by subsequent passes (e.g.&#65;becameA). This broke round-trippingunescape(escape(s))for strings containing entity-like patterns.Changes
&#([0-9]+);|&#x(\p{AHex}+);|(${namedPatterns})).