Class: Shamu::Attributes::HtmlSanitation::NoneScrubber
- Inherits:
-
Loofah::Scrubber
- Object
- Loofah::Scrubber
- Shamu::Attributes::HtmlSanitation::NoneScrubber
- Defined in:
- lib/shamu/attributes/html_sanitation.rb
Instance Method Summary collapse
-
#initialize ⇒ NoneScrubber
constructor
A new instance of NoneScrubber.
- #scrub(node) ⇒ Object
Constructor Details
#initialize ⇒ NoneScrubber
Returns a new instance of NoneScrubber.
158 159 160 |
# File 'lib/shamu/attributes/html_sanitation.rb', line 158 def initialize @direction = :bottom_up end |
Instance Method Details
#scrub(node) ⇒ Object
162 163 164 165 166 167 168 169 |
# File 'lib/shamu/attributes/html_sanitation.rb', line 162 def scrub( node ) if node.text? Loofah::Scrubber::CONTINUE else node.before node.children node.remove end end |