mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Dont try to parse "data" urls as links
This commit is contained in:
parent
204d5ff8f8
commit
8264511d32
Notes:
sideshowbarker
2024-07-18 08:29:50 +09:00
Author: https://github.com/stelar7
Commit: 8264511d32
Pull-request: https://github.com/SerenityOS/serenity/pull/8954
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