1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

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

View file

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