Skip to content

Fix CSS escapes in v2 ID and class selectors - #221

Merged
dperini merged 1 commit into
masterfrom
fix/v2-selector-escapes
Sep 24, 2026
Merged

dperini merged 1 commit into
masterfrom
fix/v2-selector-escapes

Conversation

@jdalton

@jdalton jdalton commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Decode CSS escapes in ID and class selector tokens before building their matchers.
  • Escape the decoded values for JavaScript regular expressions so punctuation stays literal.
  • Add integration coverage for hex escapes, replacement characters, supplementary code points, and escaped punctuation.

Verification

  • Pinned WPT dom/nodes/ParentNode-querySelector-escapes.html: 68/68 passing with the checkout engine (previously 27/68).
  • npm test: 38/38 passing.
  • git diff --check: clean.

npm run lint could not run because this checkout has no eslint executable installed.

@dperini
dperini merged commit 90fbbd4 into master Sep 24, 2026
2 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