From 8264511d3283e54901dc452f4f74b2cc4889af3b Mon Sep 17 00:00:00 2001 From: stelar7 Date: Fri, 23 Jul 2021 11:31:51 +0200 Subject: LibWeb: Dont try to parse "data" urls as links --- Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Userland') 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 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. -- cgit v1.2.3