💥 Breaking Change
cleanHTML.denyTagsdefault changed from'script'to'script,iframe,object,embed'— iframes, objects, and embeds are now blocked by defaultcleanHTML.removeOnErroris deprecated in favor ofcleanHTML.removeEventAttributes— allon*event handler attributes (onerror,onclick,onload,onmouseover, etc.) are now removed by default, not justonerrorcleanHTML.safeLinksTargetis nowtrueby default — links withtarget="_blank"automatically getrel="noopener noreferrer"cleanHTML.sandboxIframesInContentis nowtrueby default — all<iframe>elements in editor content getsandbox=""attributecleanHTML.convertUnsafeEmbedsis now['object', 'embed']by default — listed elements are converted to sandboxed<iframe>
🏠 Internal
- Add Statoscope for webpack bundle size analysis and build comparison
- refactor: replace setAttribute and removeAttribute with attr helper in multiple files
🚀 New Feature
- New option
cleanHTML.removeEventAttributes— removes allon*event handler attributes for comprehensive XSS protection (onerror, onclick, onload, onmouseover, onfocus, etc.) - New option
cleanHTML.safeLinksTarget— automatically addsrel="noopener noreferrer"totarget="_blank"links to preventwindow.openerattacks - New option
cleanHTML.allowedStyles— whitelist of allowed CSS properties instyleattributes, prevents CSS injection attacks (e.g. data exfiltration viabackground-image: url(...)) - New option
cleanHTML.sanitizer— hook for external sanitizer integration (e.g. DOMPurify). Called before Jodit's built-in sanitization - New option
cleanHTML.sandboxIframesInContent— addssandbox=""to all<iframe>in editor content - New option
cleanHTML.convertUnsafeEmbeds(false | string[]) — converts listed tags to sandboxed<iframe>, customizable list
📝 Documentation
- New comprehensive security guide:
docs/security.mdcovering XSS protection, CSP, Trusted Types, HTML Sanitizer API, server-side sanitization, and hardened configuration examples