Newer
Older
dmpopidor / app / scrubbers / table_free_scrubber.rb
@Gavin Morrice Gavin Morrice on 28 Aug 2018 274 bytes Issue 532 (#1847)
class TableFreeScrubber < Rails::Html::PermitScrubber

  TABLE_TAGS = %w[table thead tbody tr td th tfoot caption]

  ALLOWED_TAGS = Rails.application.config.action_view.sanitized_allowed_tags - TABLE_TAGS

  def initialize
    super
    self.tags = ALLOWED_TAGS
  end

end