csstools/sanitize.css
A best-practices CSS foundation
Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance
A best-practices CSS foundation
A pure Python HTML5 parser that just works. No C extensions to compile. No system dependencies to install. No complex API to learn.
A modern alternative to CSS resets
Safely add untrusted strings to HTML/XML markup.
Unstyle CSS - Forget inconsistencies, let us start with a blank slate.
DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
2 captures since 2026-05-25
package.json
· javascript · 15 dependencies