lib/sanitize.rb
# Sanitizes the specified Nokogiri::XML::Node and all its children.
Sanitizes the specified Nokogiri::XML::Node and all its children.
Sanitizes the specified Nokogiri :: XML :: Node and all its children .
def clean_node!(node)
    raise ArgumentError unless node.is_a?(Nokogiri::XML::Node)
    node_whitelist = Set.new
    unless @transformers[:breadth].empty?
      traverse_breadth(node) {|n| transform_node!(n, node_whitelist, :breadth) }
    end
    traverse_depth(node) {|n| transform_node!(n, node_whitelist, :depth) }
    node
  end
def clean_node! ( node ) raise ArgumentError unless node . is_a? ( Nokogiri :: XML :: Node ) node_whitelist = Set . new unless @transformers [ :breadth ] . empty? traverse_breadth ( node ) { | n | transform_node! ( n , node_whitelist , :breadth ) } end traverse_depth ( node ) { | n | transform_node! ( n , node_whitelist , :depth ) } node end
Sanitizes the specified Nokogiri::XML::Node and all its children.
Sanitizes the specified Nokogiri :: XML :: Node and all its children .
node