Class: Loofah::Helpers::ActionView::SafeListSanitizer
- Inherits:
-
Object
- Object
- Loofah::Helpers::ActionView::SafeListSanitizer
- Defined in:
- lib/loofah/helpers.rb
Overview
Replacement class for Rails’s HTML::WhiteListSanitizer.
To use by default, call this in an application initializer:
ActionView::Helpers::SanitizeHelper.safe_list_sanitizer = ::Loofah::Helpers::ActionView::SafeListSanitizer.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
89 90 91 |
# File 'lib/loofah/helpers.rb', line 89 def sanitize html, *args Loofah::Helpers.sanitize html end |
#sanitize_css(style_string, *args) ⇒ Object
93 94 95 |
# File 'lib/loofah/helpers.rb', line 93 def sanitize_css style_string, *args Loofah::Helpers.sanitize_css style_string end |