Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-11-14 15:35:06 +08:00
commit 5f85f202a4
4 changed files with 47 additions and 3 deletions

View file

@ -426,6 +426,17 @@ SVGUseElement::LookupHref()
nsCOMPtr<nsIURI> targetURI;
nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(targetURI), href,
GetComposedDoc(), baseURI);
// Do not allow 'data:' schemes in <use> elements.
// See spec update: https://github.com/w3c/svgwg/pull/901
if (targetURI) {
bool isData;
mozilla::Unused << targetURI->SchemeIs("data", &isData);
if (isData) {
return;
}
}
mSource.Reset(this, targetURI);
}