Class | Loofah::Scrubbers::Prune |
In: |
lib/loofah/scrubbers.rb
|
Parent: | Scrubber |
+:prune+ removes unknown/unsafe tags and their contents (including their subtrees):
unsafe_html = "ohai! <div>div is safe</div> <foo>but foo is <b>not</b></foo>" Loofah.fragment(unsafe_html).scrub!(:prune) => "ohai! <div>div is safe</div> "