mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
2ef76bf97b
A start tag missing its closing `>` before the next `<` (e.g. a bad string-replace that leaves `<img ... <div class="hl"></div>` behind) is parsed leniently by the browser's HTML5 tokenizer: the `<div` text is consumed as a bogus attribute name on the still-open `img` tag, and the intended element never becomes a real DOM node. No existing lint/check gate catches this — they all operate on the resolved DOM, which looks structurally valid once the browser has already dropped the element. Adds `unclosed_tag_swallowed_element`, a new core lint rule that flags any parsed tag whose attribute text contains a `<` outside a quoted value (a legitimate attribute value may itself contain a raw `<`, e.g. `data-expr="x < y"`, which htmlparser2 parses correctly and is not flagged). PRINFRA-668 Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>