module Loofah::InstanceMethods

def scrub!(scrubber)


README.rdoc for more example usage.
Please see Scrubber for more information on implementation and traversal, and

Loofah.scrub_fragment and Loofah.scrub_document.
Note that this method is called implicitly from

# => "ohai!
div is safe
"
Loofah.fragment(unsafe_html).scrub!(:strip).to_s
unsafe_html = "ohai!
div is safe
"

or

# => "
foo

bar

"
Loofah.fragment("foo

bar

").scrub!(span2div).to_s
end
node.name = "div" if node.name == "span"
span2div = Loofah::Scrubber.new do |node|

built-in scrubbers (see Scrubbers), or a Scrubber instance.
+scrubber+ must either be one of the symbols representing the

each node.
Traverse the document or fragment, invoking the +scrubber+ on
def scrub!(scrubber)
  scrubber = Scrubbers::MAP[scrubber].new if Scrubbers::MAP[scrubber]
  raise Loofah::ScrubberNotFound, "not a Scrubber or a scrubber name: #{scrubber.inspect}" unless scrubber.is_a?(Loofah::Scrubber)
  sanitize_roots.children.each { |node| scrubber.traverse(node) }
  self
end

def text


Returns a plain-text version of the markup contained by the fragment or document
def text
  sanitize_roots.children.inner_text
end