class ReeText::StripTags
def call(html)
def call(html) return html if is_blank(html) loofah_fragment = Loofah.fragment(html) loofah_fragment.scrub!(TextOnlyScrubber.new) properly_encode(loofah_fragment, encoding: 'UTF-8') end
def properly_encode(fragment, options)
def properly_encode(fragment, options) fragment.xml? ? fragment.to_xml(options) : fragment.to_html(options) end