class Loofah::Helpers::ActionView::WhiteListSanitizer

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

Public Instance Methods

sanitize(html, *args) click to toggle source
# File lib/loofah/helpers.rb, line 83
def sanitize html, *args
  Loofah::Helpers.sanitize html
end
sanitize_css(style_string, *args) click to toggle source
# File lib/loofah/helpers.rb, line 87
def sanitize_css style_string, *args
  Loofah::Helpers.sanitize_css style_string
end