Sha256: 9b7d796d4a2bad0876be35802809534db8b30e786527097fd52af0d14a5ba57f
Contents?: true
Size: 323 Bytes
Versions: 35
Compression:
Stored size: 323 Bytes
Contents
module Bergamasco module Sanitize ALLOWED_TAGS = Set.new(%w(strong em b i code pre sub sup br)) def self.sanitize(text, options={}) options[:tags] ||= ALLOWED_TAGS custom_scrubber = Bergamasco::WhitelistScrubber.new(options) Loofah.scrub_fragment(text, custom_scrubber).to_s end end end
Version data entries
35 entries across 35 versions & 1 rubygems