lib/sanitize.rb in sanitize-1.0.3 vs lib/sanitize.rb in sanitize-1.0.4
- old
+ new
@@ -82,10 +82,10 @@
# Performs clean in place, returning _html_, or +nil+ if no changes were
# made.
def clean!(html)
fragment = Hpricot(html)
- fragment.traverse_element do |node|
+ fragment.search('*') do |node|
if node.bogusetag? || node.doctype? || node.procins? || node.xmldecl?
node.swap('')
next
end