summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-07 21:20:18 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-07 21:20:18 +0100
commit56764a2db8c33fa600719f70836b290876390cdd (patch)
tree994125cced6d6c955dc104d274b8ee48201eeb41
parent397acde8464a67a997a3081cd098e9d4f07237b6 (diff)
downloadserenity-56764a2db8c33fa600719f70836b290876390cdd.zip
LibHTML: Don't swallow '}' as part of CSS property values
-rw-r--r--Libraries/LibHTML/Parser/CSSParser.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Libraries/LibHTML/Parser/CSSParser.cpp b/Libraries/LibHTML/Parser/CSSParser.cpp
index 5c562389bb..4d8e8e0f3f 100644
--- a/Libraries/LibHTML/Parser/CSSParser.cpp
+++ b/Libraries/LibHTML/Parser/CSSParser.cpp
@@ -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()