sanitize
Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of acceptable elements, attributes, and CSS properties, Sanitize will remove all unacceptable HTML and/or CSS from a string.
Types
Docs
Guides
Zeitwerk
Namespace
Optimized
Getting Started
Learn more about the Sanitize gem.
Playground
Test, play and inspect the gem for yourself