lib/sanitize.rb in sanitize-4.6.4 vs lib/sanitize.rb in sanitize-4.6.5

- old
+ new

@@ -79,10 +79,11 @@ @transformers = Array(@config[:transformers]).dup # Default transformers always run at the end of the chain, after any custom # transformers. + @transformers << Transformers::CleanElement.new(@config) @transformers << Transformers::CleanComment unless @config[:allow_comments] if @config[:elements].include?('style') scss = Sanitize::CSS.new(config) @transformers << Transformers::CSS::CleanElement.new(scss) @@ -91,13 +92,11 @@ if @config[:attributes].values.any? {|attr| attr.include?('style') } scss ||= Sanitize::CSS.new(config) @transformers << Transformers::CSS::CleanAttribute.new(scss) end - @transformers << - Transformers::CleanDoctype << - Transformers::CleanCDATA << - Transformers::CleanElement.new(@config) + @transformers << Transformers::CleanDoctype + @transformers << Transformers::CleanCDATA end # Returns a sanitized copy of the given _html_ document. # # When sanitizing a document, the `<html>` element must be whitelisted or an