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)
tokens = TreeWalkers.getTreeWalker('rexml').new(tree.to_ncr)
HTMLSerializer.serialize(tokens, {:encoding=>'utf-8',
:quote_attr_values => 'true',
:minimize_boolean_attributes => 'false',
:use_trailing_solidus => 'true',
:space_before_trailing_solidus => 'true',
:omit_optional_tags => 'false',
:inject_meta_charset => 'false',
:sanitize => 'true'})
:quote_attr_values => true,
:minimize_boolean_attributes => false,
:use_trailing_solidus => true,
:space_before_trailing_solidus => true,
:omit_optional_tags => false,
:inject_meta_charset => false,
:sanitize => true})
end
end

View file

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