Browse Source

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.
Sam Atkins 3 years ago
parent
commit
2a7a8d2cab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp

+ 1 - 1
Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp

@@ -841,7 +841,7 @@ Token Tokenizer::consume_a_numeric_token()
 
         // 2. Consume a name. Set the <dimension-token>’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 <dimension-token>.