Skip to content

fix(parser): keep slashes in unquoted attribute values - #3

Merged
OrlovEvgeny merged 1 commit into
masterfrom
fix/unquoted-attribute-values
Aug 31, 2026
Merged

OrlovEvgeny merged 1 commit into
masterfrom
fix/unquoted-attribute-values

Conversation

@OrlovEvgeny

Copy link
Copy Markdown
Owner

The unquoted attribute value scanner treated '/' as a terminator, so <a href=books/learning-zig/chapter11/ class=link> yielded href="books" and the rest of the tag leaked into the document as text (issue #2).

Per the HTML tokenizer, an unquoted value ends only at whitespace or '>'; a solidus is an ordinary value character. A solidus in before-attribute-name position now closes the tag only when '>' follows immediately, so stray slashes no longer discard the remaining attributes.

Fixes #2

Claude-Session: https://claude.ai/code/session_01VtdWqKJzT4pmd28HhYmi8X

The unquoted attribute value scanner treated '/' as a terminator, so
`<a href=books/learning-zig/chapter11/ class=link>` yielded href="books"
and the rest of the tag leaked into the document as text (issue #2).

Per the HTML tokenizer, an unquoted value ends only at whitespace or '>';
a solidus is an ordinary value character. A solidus in before-attribute-name
position now closes the tag only when '>' follows immediately, so stray
slashes no longer discard the remaining attributes.

Fixes #2

Claude-Session: https://claude.ai/code/session_01VtdWqKJzT4pmd28HhYmi8X
@OrlovEvgeny
OrlovEvgeny merged commit eaaef49 into master Aug 31, 2026
7 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.

Attribute values are extracted incorrectly when they are not enclosed in quotation marks.

1 participant