sanitize-html

★ 4,120 Open GitHub ↗

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

// repository documentation