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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
fix($sanitize): remove browser bug detections from inert strategy selection
Default to using DOMParser if it is available and fall back to
createHTMLDocument if needed. This is the approach suggested in the
related pull request #17013 and used by DOMPurify too. It also safely
avoids using an inline style tag that causes CSP violation errors if inline
CSS is prohibited.
The related unit tests in `sanitizeSpec.js`, "should not allow JavaScript
execution when creating inert document" and "should not allow JavaScript
hidden in badly formed HTML to get through sanitization (Firefox bug)", are
left untouched to assert that the behavior hasn't changed in those scenarios.
Fixes#16463.
0 commit comments