Sha256: f80b1967039cb761d6fb0785eabb8a5d4134654a444a63881484d2f9258e2c19
Contents?: true
Size: 666 Bytes
Versions: 11
Compression:
Stored size: 666 Bytes
Contents
module Parliament module Utils module Services class ParliamentMarkdownScrubber < Rails::Html::PermitScrubber # Overrides default sanitization allowing Parliament tags and/or attributes def initialize super self.tags = %w[p div h1 h2 h3 h4 h5 h6 span a ol li ul strong em i itag strike del u sup sub blockquote cite table thead tbody tfoot tr th td iframe image pre code dl dt dd hr br] self.attributes = %w[class href src name title allowfullscreen seamless frameborder style] end def skip_node?(node) node.text? || node.name === 'iframe' end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems