Skip to content

Changes the TAG and ATTR patterns to be more in line with HTML5 (#1297)#1302

Merged
dpvc merged 1 commit intodevelopfrom
issue1297
Jul 18, 2025
Merged

Changes the TAG and ATTR patterns to be more in line with HTML5 (#1297)#1302
dpvc merged 1 commit intodevelopfrom
issue1297

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented Jul 9, 2025

This PR makes the parsing of tags and attributes more compliant with he HTML5 spec, which has much looser parameters for tag and attribute names. XML parsing is more restrictive, but since the parser must work for both (it is not very sophisticated), it needs to use the less restrictive version (HTML5).

The main change is that attribute names don't have to start with a letter. The other restrictions remove the control characters and the other disallowed characters. See #1297 for some discussion of the specs.

@dpvc dpvc requested a review from zorkow July 9, 2025 20:14
@dpvc dpvc added this to the v4.0 milestone Jul 9, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.71%. Comparing base (4d1e195) to head (a6751d5).

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #1302     +/-   ##
==========================================
  Coverage    86.71%   86.71%             
==========================================
  Files          337      337             
  Lines        83979    83980      +1     
  Branches      4750     3124   -1626     
==========================================
+ Hits         72826    72827      +1     
- Misses       11130    11153     +23     
+ Partials        23        0     -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

lgtm.

@dpvc dpvc merged commit f26bbf7 into develop Jul 18, 2025
3 checks passed
@dpvc dpvc deleted the issue1297 branch July 18, 2025 18:01
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