Sha256: 0727989be08c512dd12f923a4a2bf7ae7da7b014912504be79b30d6a826e15e9
Contents?: true
Size: 818 Bytes
Versions: 20
Compression:
Stored size: 818 Bytes
Contents
module HoboFields module SanitizeHtml PERMITTED_TAGS = %w(a abbr acronym address b bdo big blockquote br caption center cite code colgroup dd del dfn dir div dl dt em fieldset font h1 h2 h3 h4 h5 h6 i img ins kbd label legend li map menu ol optgroup option p pre q s samp select small span strike strong sub sup tbody td textarea tfoot th thead tr tt u ul var) PERMITTED_ATTRIBUTES = %w(href title class style align name src label target) class Helper; include ActionView::Helpers::SanitizeHelper; extend ActionView::Helpers::SanitizeHelper::ClassMethods; end def self.sanitize(s) Helper.new.sanitize(s, :tags => PERMITTED_TAGS, :attributes => PERMITTED_ATTRIBUTES) end end end
Version data entries
20 entries across 20 versions & 1 rubygems