You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HtmlSanitizer's SanitizeDocument function does not sanitize the root html element.
For example, sanitizing the trivial document: <html onmousemove="alert(document.location)"><head></head><body></body></html>
does not strip the onmousemove attribute, which is not an allowed attribute.
It appears to me this is due to the use of QuerySelectorAll("*") in DoSanitize which only returns descendants and effectively skips the "context" element.
The text was updated successfully, but these errors were encountered:
The HtmlSanitizer's SanitizeDocument function does not sanitize the root html element.
For example, sanitizing the trivial document:
<html onmousemove="alert(document.location)"><head></head><body></body></html>
does not strip the onmousemove attribute, which is not an allowed attribute.
It appears to me this is due to the use of QuerySelectorAll("*") in DoSanitize which only returns descendants and effectively skips the "context" element.
The text was updated successfully, but these errors were encountered: