Module: Rails::HTML::Concern::ComposedSanitize

Instance Method Summary collapse

Instance Method Details

#sanitize(html, options = {}) ⇒ Object



35
36
37
38
39
40
# File 'lib/rails/html/sanitizer.rb', line 35

def sanitize(html, options = {})
  return unless html
  return html if html.empty?

  serialize(scrub(parse_fragment(html), options))
end