An HTML sanitizer written in Rust


Ammonia is a HTML sanitizer built on top of html5ever, written in pure safe and stable Rust. It’s intended to take untrusted user input that contains some HTML, so that you can safely post it on your website; it uses a whitelist, and the default whitelist does not include anything that would allow users to break a (normal) website layout or run arbitrary JavaScript. It will also close unclosed tags, etc.

Critiques are welcome.

Ammonia goes stable, releases version 1.0.0 with backwards compatibility promise