npm dompurify 3.5.1
DOMPurify 3.5.1

56 minutes ago

Changelog

  • Fixed an issue where WHOLE_DOCUMENT dropped a body holding only text and a comment, thanks @rvullriede
  • Fixed sanitize() throwing for body and html DOM node input when root was forbidden or risky, thanks @rvullriede
  • Fixed WHOLE_DOCUMENT throwing for string input when html is forbidden, thanks @rvullriede
  • Fixed the RETURN_DOM and RETURN_DOM_FRAGMENT return types of sanitize() to include null, thanks @YevheniiKotyrlo
  • Added better hardening for IN_PLACE with <selectedcontent>, thanks @DicksonWu654
  • Removed three stale osv-scanner ignore entries, thanks @zyl71
  • Updated several dependencies and GitHub Actions

Behavioral changes

  • For body and html DOM node input, a forbidden root no longer throws. Its sanitized content is returned, as for string input.
  • A DOM node named BODY or HTML outside HTML namespace is no longer used as walk root. It is removed.
  • With RETURN_DOM or RETURN_DOM_FRAGMENT, TypeScript callers now get | null and may need a null check.

Don't miss a new dompurify release

NewReleases is sending notifications on new releases.