From 3fefc7f3e9324c5f2b9867dc6f509e156767ad29 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 25 Jun 2020 16:52:38 +0200 Subject: [PATCH] LibWeb: Tweak CSS parser to swallow backslash-escaped characters This isn't the correct way of doing this, but at least it allows the parsing to progress a bit further in some cases. --- Libraries/LibWeb/Parser/CSSParser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/LibWeb/Parser/CSSParser.cpp b/Libraries/LibWeb/Parser/CSSParser.cpp index 74310f1b27..3212701032 100644 --- a/Libraries/LibWeb/Parser/CSSParser.cpp +++ b/Libraries/LibWeb/Parser/CSSParser.cpp @@ -718,6 +718,11 @@ public: } if (!ch) break; + if (ch == '\\') { + consume_one(); + buffer.append(consume_one()); + continue; + } if (ch == '}') break; if (ch == ';')