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

15 lines
286 B
Ruby
Raw Normal View History

# frozen_string_literal: true
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