From f0c94758f48598a6f3055ae48988397310d45a1d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 28 Nov 2019 07:40:40 +0100 Subject: [PATCH] LibHTML: CSS parser should accept "foo>bar", not just "foo > bar" If we peek a combinator at the start of a simple selector, we're seeing the start of a new complex selector. --- Libraries/LibHTML/Parser/CSSParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibHTML/Parser/CSSParser.cpp b/Libraries/LibHTML/Parser/CSSParser.cpp index 33c32619a8..de20713ca7 100644 --- a/Libraries/LibHTML/Parser/CSSParser.cpp +++ b/Libraries/LibHTML/Parser/CSSParser.cpp @@ -207,7 +207,7 @@ public: if (consume_whitespace_or_comments()) return {}; - if (peek() == '{' || peek() == ',') + if (peek() == '{' || peek() == ',' || is_combinator(peek())) return {}; Selector::SimpleSelector::Type type;