Skip to content

Instantly share code, notes, and snippets.

# Put in config/initializers/html_sanitizer.rb
#
# See https://github.com/rails/rails-html-sanitizer/blob/master/lib/rails/html/scrubbers.rb
# for more help on how the PermitScrubber works and the functions you can override.
class CustomScrubber < Rails::Html::PermitScrubber
def initialize
super
puts("CustomScrubber says hi!")
self.tags = %w( script iframe figure figcaption action-text-attachment )