[DOM] use the sanitizer to restrict href in svg:use to fragment-only URLs

This commit is contained in:
Moonchild 2022-07-03 13:03:18 +00:00 committed by roytam1
commit c0429c9a0f
2 changed files with 18 additions and 4 deletions

View file

@ -143,11 +143,13 @@ class MOZ_STACK_CLASS nsTreeSanitizer {
* @param aElement the element whose attribute to possibly modify
* @param aNamespace the namespace of the URL attribute
* @param aLocalName the local name of the URL attribute
* @param aFragmentOnly allows same-document references only
* @return true if the attribute was removed and false otherwise
*/
bool SanitizeURL(mozilla::dom::Element* aElement,
int32_t aNamespace,
nsIAtom* aLocalName);
nsIAtom* aLocalName,
bool aFragmentOnly = false);
/**
* Checks a style rule for the presence of the 'binding' CSS property and