mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:07:34 +00:00
LibWeb: Dont try to parse "data" urls as links
This commit is contained in:
parent
204d5ff8f8
commit
8264511d32
1 changed files with 6 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue