Awesome Lists

sanitize-html

by apostrophecms

JavaScriptpushed almost 2 years ago

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

AI summary

HTML sanitizer

A JavaScript library for cleaning up and sanitizing user-submitted HTML, removing unwanted content while preserving whitelisted elements and attributes.

stars
3.9K
forks
353
watching
36
awesome list
1
View on GitHub

Embed the badge

Show how many awesome lists link to your project. The count updates automatically.

Awesome Lists badge
Markdown
[![Awesome Lists Badge](https://awesome.facts.dev/shield/apostrophecms/sanitize-html/links.svg)](https://awesome.facts.dev/awesome/apostrophecms/sanitize-html)
HTML
<a href="https://awesome.facts.dev/awesome/apostrophecms/sanitize-html"><img src="https://awesome.facts.dev/shield/apostrophecms/sanitize-html/links.svg" alt="Awesome Lists Badge" /></a>
Image URL
https://awesome.facts.dev/shield/apostrophecms/sanitize-html/links.svg

Add a GitHub project

Missing a project or an awesome list? Paste its GitHub URL and we fetch it right away.