diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-07 21:20:18 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-07 21:20:18 +0100 |
commit | 56764a2db8c33fa600719f70836b290876390cdd (patch) | |
tree | 994125cced6d6c955dc104d274b8ee48201eeb41 | |
parent | 397acde8464a67a997a3081cd098e9d4f07237b6 (diff) | |
download | serenity-56764a2db8c33fa600719f70836b290876390cdd.zip |
LibHTML: Don't swallow '}' as part of CSS property values
-rw-r--r-- | Libraries/LibHTML/Parser/CSSParser.cpp | 5 |
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() |