Class: Loofah::Helpers::ActionView::FullSanitizer

Inherits:
Object
  • Object
show all
Defined in:
lib/loofah/helpers.rb

Overview

Replacement class for Rails’s HTML::FullSanitizer.

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

  ActionView::Helpers::SanitizeHelper.full_sanitizer = \
    Loofah::Helpers::ActionView::FullSanitizer.new

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

  Loofah::Helpers::ActionView.set_as_default_sanitizer

Instance Method Summary collapse

Instance Method Details

#sanitize(html, *args) ⇒ Object



77
78
79
# File 'lib/loofah/helpers.rb', line 77

def sanitize(html, *args)
  Loofah::Helpers.strip_tags(html)
end