No issue - Stop supporting data: scheme in SVG <use> elements.

This commit is contained in:
Moonchild 2023-11-13 19:28:44 +01:00 committed by roytam1
commit b19fe58909

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);
}