1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

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

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;