File: //usr/local/rvm/gems/default/doc/loofah-2.12.0/ri/Loofah/ScrubBehavior/cdesc-ScrubBehavior.ri
U:RDoc::NormalModule[iI"ScrubBehavior:ETI"Loofah::ScrubBehavior;T0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"FMixes +scrub!+ into Document, DocumentFragment, Node and NodeSet.;To:RDoc::Markup::BlankLine o; ;[I"CTraverse the document or fragment, invoking the +scrubber+ on ;TI"each node.;T@o; ;[I"C+scrubber+ must either be one of the symbols representing the ;TI"@built-in scrubbers (see Scrubbers), or a Scrubber instance.;T@o:RDoc::Markup::Verbatim;[
I"/span2div = Loofah::Scrubber.new do |node|
;TI"0 node.name = "div" if node.name == "span"
;TI" end
;TI"ILoofah.fragment("<span>foo</span><p>bar</p>").scrub!(span2div).to_s
;TI"%# => "<div>foo</div><p>bar</p>"
;T:@format0o; ;[I"or;T@o;;[I"Uunsafe_html = "ohai! <div>div is safe</div> <script>but script is not</script>"
;TI"6Loofah.fragment(unsafe_html).scrub!(:strip).to_s
;TI"*# => "ohai! <div>div is safe</div> "
;T;0o; ;[I"5Note that this method is called implicitly from ;TI"5Loofah.scrub_fragment and Loofah.scrub_document.;T@o; ;[I"SPlease see Scrubber for more information on implementation and traversal, and ;TI"(README.rdoc for more example usage.;T:
@fileI"#lib/loofah/instance_methods.rb;T:0@omit_headings_from_table_of_contents_below0;
0;0[ [ [ [[I"
class;T[[:public[ [:protected[ [:private[ [I"
instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;
0;0[@0I"Loofah;TcRDoc::NormalModule