class Rails::Html::FullSanitizer

# => Bold no more! See more here…
full_sanitizer.sanitize(“Bold no more! <a href=‘more.html’>See more here</a>…”)
full_sanitizer = Rails::Html::FullSanitizer.new
Removes all tags but strips out scripts, forms and comments.
=== Rails::Html::FullSanitizer

def sanitize(html, options = {})

def sanitize(html, options = {})
  return unless html
  return html if html.empty?
  Loofah.fragment(html).tap do |fragment|
    remove_xpaths(fragment, XPATHS_TO_REMOVE)
  end.text(options)
end