mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-27 21:42:53 +00:00
LibWeb/CSS: Ensure a font source format() only contains one string/ident
This commit is contained in:
parent
52a4259ef2
commit
9f333c424c
Notes:
github-actions[bot]
2025-04-15 19:41:39 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9f333c424c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4364
2 changed files with 11 additions and 5 deletions
|
@ -3711,6 +3711,12 @@ RefPtr<FontSourceStyleValue> Parser::parse_font_source_value(TokenStream<Compone
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
format_tokens.discard_whitespace();
|
||||
if (format_tokens.has_next_token()) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: font source invalid (`format()` has trailing tokens); discarding.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
format = move(format_name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue