Class Loofah::Helpers::ActionView::WhiteListSanitizer
In: lib/loofah/helpers.rb
Parent: Object

Replacement class for Rails‘s HTML::WhiteListSanitizer.

To use by default, call this in an application initializer:

  ActionView::Helpers::SanitizeHelper.white_list_sanitizer = ::Loofah::Helpers::ActionView::WhiteListSanitizer.new

Or, to generally opt-in to Loofah‘s view sanitizers:

  Loofah::Helpers::ActionView.set_as_default_sanitizer

Methods

Public Instance methods

[Validate]