Repository navigation
Conversation
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.
Purpose / Goal
Fixes #892. XML numeric character references are part of XML independently of HTML named entities. Enable numeric decoding in the default entity decoder without enabling names such as
©.processEntities: falseand custom decoders remain respected.Tests cover decimal/hex references in text and attributes, supplementary Unicode, HTML named-entity opt-in, single-pass decoding (
AstaysA), disabled processing, and XML 1.1 control references. Two old expectations that retained numeric-reference spellings are updated to decoded content.Type
Read
docs/CONTRIBUTING.md. Changelog/version/browser-bundle updates are left to maintainers as requested there.Local Linux / Node 24.21.0 results:
ecmaVersion: 6on existing object spread; with a modern parser, the same two unused-variable errors occur on baseline and patch. No clean full-lint claim.node benchmark/XmlParser.mjsbefore/after (ops/s): fxp 48,938 → 42,732; preserve-order 56,851 → 60,942. These single runs are noisy (other libraries also moved). Six interleaved, fresh-process 20,000-parse samples on the same fixture had median 386ms baseline / 394ms patch (~2% slower), with overlapping ranges 368–402ms / 357–407ms. This is not a performance guarantee or a CI/platform-matrix result.Prepared with AI assistance.