dev.club — where best developers and top companies connect.

dev.club — where best developers and top companies connect.Invite only

Request invite

New JavaScript HTML Sanitizers 2026

GitHub Libraries JavaScript HTML Sanitizers

apostrophecms/sanitize-html 4K

added 1 year ago

Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance

cure53/dompurify 17K +24

added 1 year ago

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.

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.