From 2a7a8d2cabc225970331279528106380d12b1cdc Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 2 Feb 2022 17:22:52 +0000 Subject: [PATCH] LibWeb: Don't verify that a dimension unit isn't whitespace Raw whitespace is not allowed inside a name, but escaped whitespace is, for example `\9`, which is the tab character. This stops yakzz.com from crashing the Browser, since it was using `\9` in various places as a hack to only apply those properties to IE8/9. --- Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp index 82be71993c..5042a56bf8 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp @@ -841,7 +841,7 @@ Token Tokenizer::consume_a_numeric_token() // 2. Consume a name. Set the ’s unit to the returned value. auto unit = consume_a_name(); - VERIFY(!unit.is_empty() && !unit.is_whitespace()); + VERIFY(!unit.is_empty()); token.m_unit = move(unit); // 3. Return the .