A modernized version of Chris Wansthrath's venerable acts_as_textiled. It automatically textiles and then sanitizes columns to your specification. Ryan Grove's excellent Sanitize gem with nokogiri provides the backend for speedy and robust filtering of your output in order to: restrict Textile to a subset of HTML, guarantee well-formedness, and of course prevent XSS.
Dryopteris erythrosora is the Japanese Shield Fern. It also can be used to sanitize HTML to help prevent XSS attacks.
This Rails plugin provides automatic cross site scripting (XSS) protection for your views. Once installed, you no longer have to manually and painstakingly sanitize all your views with HTML escaping.
Dryopteris erythrosora is the Japanese Shield Fern. It also can be used to sanitize HTML to help prevent XSS attacks.
A gem to sanitize URLs or HTML href attributes within <a> tags to help prevent XSS attacks.
htmlsafeslip parses Ruby source with Ripper to find a call to `.html_safe` directly on an expression, or a `raw(...)` wrapping one, where that expression is traceable (directly, or via a same-method local-variable assignment) to `params[...]`/`params.dig(...)`, with no `sanitize(...)`/`strip_tags(...)`/`h(...)`/`ERB::Util.html_escape(...)` call applied to it first. Both `.html_safe` and `raw(...)` tell Rails' view layer "this string is already safe HTML, don't auto-escape it" -- calling either directly on unsanitized, user-controlled input defeats Rails' single biggest built-in XSS defense, turning a reflected or stored script-tag payload into live, executing HTML the instant it's rendered.
Plugin that auto-sanitizes data before it is saved in your DataMapper models