LibWeb: Accept MIME types starting with "application/font" for CSS fonts

Although "application/font-woff" is apparently "deprecated", it's very
much still in use on the web, so we should not be rejecting it.
This commit is contained in:
Andreas Kling 2023-07-06 10:50:00 +02:00
parent 541bf17a4a
commit dfdb31f5b0
Notes: sideshowbarker 2024-07-17 05:41:34 +09:00

View file

@ -2340,6 +2340,8 @@ Optional<AK::URL> Parser::parse_url_function(ComponentValue const& component_val
case AllowedDataUrlType::Font:
if (data_url.data_mime_type().starts_with("font"sv, CaseSensitivity::CaseInsensitive))
return data_url;
if (data_url.data_mime_type().starts_with("application/font"sv, CaseSensitivity::CaseInsensitive))
return data_url;
break;
default:
break;