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
Context
See: \dev-docs/milestones/ASPX-MIDDLEWARE-MILESTONES.md\ § Milestone A
See: \dev-docs/aspx-middleware-migration-landscape.md\ §4.2
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
Context
See: \dev-docs/milestones/ASPX-MIDDLEWARE-MILESTONES.md\ § Milestone A
See: \dev-docs/aspx-middleware-migration-landscape.md\ §4.2