LibHTML: Don't swallow '}' as part of CSS property values

This commit is contained in:
Andreas Kling 2019-11-07 21:20:18 +01:00
parent 397acde846
commit 56764a2db8
Notes: sideshowbarker 2024-07-19 11:20:10 +09:00

View file

@ -123,6 +123,9 @@ public:
char consume_specific(char ch)
{
if (peek() != ch) {
dbg() << "peek() != '" << ch << "'";
}
PARSE_ASSERT(peek() == ch);
PARSE_ASSERT(index < css.length());
++index;
@ -282,7 +285,7 @@ public:
bool is_valid_property_value_char(char ch) const
{
return ch && ch != '!' && ch != ';';
return ch && ch != '!' && ch != ';' && ch != '}';
}
Optional<StyleProperty> parse_property()