Bugfix
Me stoopid.
This commit is contained in:
parent
f0cf0ec625
commit
e1acebe6e4
|
@ -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
|
||||||
|
|
|
@ -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|
|
||||||
|
|
Loading…
Reference in a new issue