Class: DraftForge::HtmlSanitizer

Inherits:
Object
  • Object
show all
Defined in:
app/services/draft_forge/html_sanitizer.rb

Class Method Summary collapse

Class Method Details

.call(html) ⇒ Object



4
5
6
7
# File 'app/services/draft_forge/html_sanitizer.rb', line 4

def self.call(html)
  config = DraftForge.sanitizer_config
  Sanitize.fragment(html.to_s, config.merge(remove_contents: ['script', 'style']))
end