ActionView::Helpers::SanitizeHelper

module ActionView::Helpers::SanitizeHelper

The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. These helper methods extend Action View making them callable within your template files.

Public Instance Methods

sanitize(html, options = {}) Show source

Sanitizes HTML input, stripping all tags and attributes that aren't whitelisted.

It also strips href/src attributes with unsafe protocols like ja