forked from FritzAndFriends/BlazorWebFormsComponents
-
Notifications
You must be signed in to change notification settings - Fork 3
[Milestone A] A-02: Fix self-closing tag regex for > in attribute values #78
Copy link
Copy link
Open
Labels
go:needs-researchNeeds investigationNeeds investigationsquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membersquad:cyclopsAssigned to Cyclops (Component Dev)Assigned to Cyclops (Component Dev)squad:rogueAssigned to Rogue (QA Analyst)Assigned to Rogue (QA Analyst)
Description
Milestone A — Parser Hardening (A-02)
Priority: P0 — Foundation
Size: Medium
Branch: experiment/aspx-middleware
File: src/BlazorWebFormsComponents.AspxMiddleware/AspxParser.cs (~line 326)
Problem
The \SelfClosingAspTagRegex\ uses a greedy match that terminates at the first >\ character, even when it appears inside a quoted attribute value. This breaks parsing of data-binding expressions (<%# Items.Count > 0 %>) and HTML comment-wrapped expressions.
Approach
Replace the regex with a stateful character-by-character attribute parser that tracks quote depth. When inside a quoted attribute value, >\ must not be treated as a tag boundary.
Acceptance Criteria
- Tags with >\ in quoted attribute values parse correctly
- Data-binding expressions with comparison operators are preserved
- HTML comment-wrapped expressions parse correctly
- All ~52 existing tests still pass
Context
See: \dev-docs/milestones/ASPX-MIDDLEWARE-MILESTONES.md\ § Milestone A
See: \dev-docs/aspx-middleware-migration-landscape.md\ §4.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
go:needs-researchNeeds investigationNeeds investigationsquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membersquad:cyclopsAssigned to Cyclops (Component Dev)Assigned to Cyclops (Component Dev)squad:rogueAssigned to Rogue (QA Analyst)Assigned to Rogue (QA Analyst)