Me stoopid.
This commit is contained in:
Jacques Distler 2007-06-05 18:06:26 -05:00
parent f0cf0ec625
commit e1acebe6e4
2 changed files with 10 additions and 10 deletions

View file

@ -32,12 +32,12 @@ module Sanitize
def sanitize_rexml(tree) def sanitize_rexml(tree)
tokens = TreeWalkers.getTreeWalker('rexml').new(tree.to_ncr) tokens = TreeWalkers.getTreeWalker('rexml').new(tree.to_ncr)
HTMLSerializer.serialize(tokens, {:encoding=>'utf-8', HTMLSerializer.serialize(tokens, {:encoding=>'utf-8',
:quote_attr_values => 'true', :quote_attr_values => true,
:minimize_boolean_attributes => 'false', :minimize_boolean_attributes => false,
:use_trailing_solidus => 'true', :use_trailing_solidus => true,
:space_before_trailing_solidus => 'true', :space_before_trailing_solidus => true,
:omit_optional_tags => 'false', :omit_optional_tags => false,
:inject_meta_charset => 'false', :inject_meta_charset => false,
:sanitize => 'true'}) :sanitize => true})
end end
end end

View file

@ -250,9 +250,9 @@ class HTMLSerializer
require 'html5lib/sanitizer' require 'html5lib/sanitizer'
treewalker = HTMLSanitizeFilter.new(treewalker) treewalker = HTMLSanitizeFilter.new(treewalker)
end end
# if @omit_optional_tags if @omit_optional_tags
# treewalker = OptionalTagFilter.new(treewalker) treewalker = OptionalTagFilter.new(treewalker)
# end end
result = [] result = []
treewalker.each do |token| treewalker.each do |token|