Sanitize url refs in SVG attributes

Add some tests.
Sync with latest HTML5lib (includes above sanitization improvements).
This commit is contained in:
Jacques Distler 2007-10-27 17:34:29 -05:00
parent ae82f1be49
commit 5208bbf0af
28 changed files with 1277 additions and 735 deletions

View file

@ -39,7 +39,7 @@ def parse(opts, args)
if opts.parsemethod == :parse
args = [f, encoding]
else
args = [f, 'div', encoding]
args = [f, (opts.container || 'div'), encoding]
end
if opts.profile
@ -113,8 +113,9 @@ opts = OptionParser.new do |opts|
options.treebuilder = treebuilder
end
opts.on("-f", "--fragment", "Parse as a fragment") do |parse|
opts.on("-f", "--fragment CONTAINER", "Parse as a fragment") do |container|
options.parsemethod = :parse_fragment
options.container = container if container
end
opts.separator ""