lib/sanitize.rb in sanitize-1.2.2.dev.20101028 vs lib/sanitize.rb in sanitize-1.2.2.dev.20101118

- old
+ new

@@ -25,11 +25,10 @@ require 'sanitize/version' require 'sanitize/config' require 'sanitize/config/restricted' require 'sanitize/config/basic' require 'sanitize/config/relaxed' -require 'sanitize/transformers/fix_fragment_cdata' class Sanitize attr_reader :config # Matches an attribute value that could be treated by a browser as a URL @@ -89,17 +88,9 @@ # Specific nodes to whitelist (along with all their attributes). This array # is generated at runtime by transformers, and is cleared before and after # a fragment is cleaned (so it applies only to a specific fragment). @whitelist_nodes = [] - - # Workaround for a fragment parsing bug in Nokogiri >= 1.4.2. The naïve - # version check is fine here; there are no side effects for unaffected - # versions except slightly worse performance, and I plan to remove this hack - # as soon as Nokogiri fixes the bug on their end. - if Nokogiri::VERSION > '1.4.1' - @config[:transformers] << Transformers::FIX_FRAGMENT_CDATA - end end # Returns a sanitized copy of _html_. def clean(html) if html