Changelog
- Fixed an issue where
WHOLE_DOCUMENTdropped abodyholding only text and a comment, thanks @rvullriede - Fixed
sanitize()throwing forbodyandhtmlDOM node input when root was forbidden or risky, thanks @rvullriede - Fixed
WHOLE_DOCUMENTthrowing for string input whenhtmlis forbidden, thanks @rvullriede - Fixed the
RETURN_DOMandRETURN_DOM_FRAGMENTreturn types ofsanitize()to includenull, thanks @YevheniiKotyrlo - Added better hardening for
IN_PLACEwith<selectedcontent>, thanks @DicksonWu654 - Removed three stale
osv-scannerignore entries, thanks @zyl71 - Updated several dependencies and GitHub Actions
Behavioral changes
- For
bodyandhtmlDOM node input, a forbidden root no longer throws. Its sanitized content is returned, as for string input. - A DOM node named
BODYorHTMLoutside HTML namespace is no longer used as walk root. It is removed. - With
RETURN_DOMorRETURN_DOM_FRAGMENT, TypeScript callers now get| nulland may need a null check.