# File lib/loofah/scrubbers.rb, line 150 def scrub(node) case node.type when Nokogiri::XML::Node::ELEMENT_NODE if HTML5::HashedWhiteList::ALLOWED_ELEMENTS_WITH_LIBXML2[node.name] node.attributes.each { |attr| node.remove_attribute(attr.first) } return CONTINUE if node.namespaces.empty? end when Nokogiri::XML::Node::TEXT_NODE, Nokogiri::XML::Node::CDATA_SECTION_NODE return CONTINUE end node.remove STOP end