[dom] Remove attributes from descendants when setting sanitized style.

This avoids a number of problems with incomplete sanitation.
This commit is contained in:
Henri Sivonen 2020-11-19 19:06:03 +00:00 committed by roytam1
commit 9de5e02cbf
2 changed files with 19 additions and 0 deletions

View file

@ -183,6 +183,12 @@ class MOZ_STACK_CLASS nsTreeSanitizer {
*/
void RemoveAllAttributes(nsIContent* aElement);
/**
* Removes all attributes from the descendants of an element but not from
* the element itself.
*/
void RemoveAllAttributesFromDescendants(mozilla::dom::Element* aElement);
/**
* The whitelist of HTML elements.
*/