diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-02-02 17:22:52 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-02 18:29:05 +0100 |
commit | 2a7a8d2cabc225970331279528106380d12b1cdc (patch) | |
tree | 5389393a26304b7e6b178ae6a30ce6854f8ea007 /Userland/Libraries/LibWeb | |
parent | d93ffe3cf80f4e828049eb35f495aa2d3400f39e (diff) | |
download | serenity-2a7a8d2cabc225970331279528106380d12b1cdc.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Tokenizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 <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>. |