Bugfix
Me stoopid.
This commit is contained in:
parent
f0cf0ec625
commit
e1acebe6e4
2 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue