diff options
author | stelar7 <dudedbz@gmail.com> | 2021-07-23 11:31:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-23 14:18:17 +0200 |
commit | 8264511d3283e54901dc452f4f74b2cc4889af3b (patch) | |
tree | 8eab6f67095867ec308d898e89cf9876bc0ef563 /Userland/Libraries/LibWeb | |
parent | 204d5ff8f86547a8b100cf26a958aaabf49211f2 (diff) | |
download | serenity-8264511d3283e54901dc452f4f74b2cc4889af3b.zip |
LibWeb: Dont try to parse "data" urls as links
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 385a2ab1b2..dff94a6b87 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -1600,8 +1600,13 @@ RefPtr<StyleValue> Parser::parse_image_value(ParsingContext const& context, Styl auto& value = function_values[i]; if (value.is(Token::Type::Whitespace)) continue; - if (value.is(Token::Type::String)) + if (value.is(Token::Type::String)) { + // FIXME: RFC2397 + if (value.token().string().starts_with("data:")) + continue; + return ImageStyleValue::create(context.complete_url(value.token().string()), *context.document()); + } } } // FIXME: Handle gradients. |