test/parser_test.rb in trac-wiki-0.3.16 vs test/parser_test.rb in trac-wiki-0.3.18
- old
+ new
@@ -28,11 +28,11 @@
"#{key}:#{value}"
end.join(',').should.equal used_templates
end
- def template_handler(tname, env)
+ def template_handler(tname, env, argv)
case tname
when 'testmacpos2'
"{{testmacpos}}"
when 'testmacpos'
"{{!macpos}}"
@@ -580,9 +580,10 @@
# Special HTML chars should be escaped
tc("<p><b>not bold</b></p>\n", "<b>not bold</b>")
# Image tags should be escape
tc("<p><img src=\"image.jpg\"/></p>\n", "[[Image(image.jpg)]]")
+ tc("<p><img src=\"/ahoj/bhoj/bla/image.jpg\"/></p>\n", "[[Image(bla/image.jpg)]]", :base => "/ahoj/bhoj", :no_escape => true)
tc("<p><img src=\"image.jpg\"/></p>\n", "[[Image(image.jpg)]]", :no_link=>true)
tc("<p><img alt=\"a%22tag%22\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]")
tc("<p><img alt=\"a%22tag%22\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]", :no_link=>true)
# Malicious links should not be converted.