Sanitize url refs in SVG attributes
Add some tests. Sync with latest HTML5lib (includes above sanitization improvements).
This commit is contained in:
parent
ae82f1be49
commit
5208bbf0af
28 changed files with 1277 additions and 735 deletions
5
vendor/plugins/HTML5lib/bin/html5
vendored
5
vendor/plugins/HTML5lib/bin/html5
vendored
|
@ -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 ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue