Open
Description
According to CSS forward-compatible parsing rules, if a CSS declaration fails to parse the parser should forward until whichever is closer of EOF and a semicolon then resume parsing.
cssparser doesn't seem to allow for this when trying to parse a "bad string" containing a newline e.g.
text-decoration: '\n'; color: green
Once the parser has triggered a BadString error, the next token is
QuotedString(
"; color: green",
),
This is not the behaviour of browsers e.g. if this is added as a style
value to an element in firefox, the text-decoration is flagged as an invalid property value, and the color declaration is parsed properly and applied.
Metadata
Assignees
Labels
No labels
Activity