Class: Loofah::Scrubbers::Strip
- Inherits:
-
Loofah::Scrubber
- Object
- Loofah::Scrubber
- Loofah::Scrubbers::Strip
- Defined in:
- lib/loofah/scrubbers.rb
Overview
scrub!(:strip)
+:strip+ removes unknown/unsafe tags, but leaves behind the pristine contents:
unsafe_html = "ohai! <div>div is safe</div> <foo>but foo is <b>not</b></foo>"
Loofah.html5_fragment(unsafe_html).scrub!(:strip)
=> "ohai! <div>div is safe</div> but foo is <b>not</b>"
Constant Summary
Constants inherited from Loofah::Scrubber
Loofah::Scrubber::CONTINUE, Loofah::Scrubber::STOP
Instance Attribute Summary
Attributes inherited from Loofah::Scrubber
Instance Method Summary collapse
-
#initialize ⇒ Strip
constructor
rubocop:disable Lint/MissingSuper.
- #scrub(node) ⇒ Object
Methods inherited from Loofah::Scrubber
Constructor Details
#initialize ⇒ Strip
rubocop:disable Lint/MissingSuper
115 116 117 |
# File 'lib/loofah/scrubbers.rb', line 115 def initialize # rubocop:disable Lint/MissingSuper @direction = :bottom_up end |