class Loofah::Helpers::ActionView::SafeListSanitizer
Loofah::Helpers::ActionView.set_as_default_sanitizer
Or, to generally opt-in to Loofah’s view sanitizers:
Loofah::Helpers::ActionView::SafeListSanitizer.new
ActionView::Helpers::SanitizeHelper.safe_list_sanitizer = <br>
To use by default, call this in an application initializer:
Replacement class for Rails’s HTML::WhiteListSanitizer.
def sanitize(html, *args)
def sanitize(html, *args) Loofah::Helpers.sanitize(html) end
def sanitize_css(style_string, *args)
def sanitize_css(style_string, *args) Loofah::Helpers.sanitize_css(style_string) end