demarches-normaliennes/app/lib/sanitizers/mail_scrubber.rb

12 lines
255 B
Ruby

module Sanitizers
class MailScrubber < Rails::Html::PermitScrubber
def initialize
super
self.tags = Rails.application.config.action_view.sanitized_allowed_tags + ['a']
end
def skip_node?(node)
node.text?
end
end
end