test/parser_test.rb in trac-wiki-0.3.32 vs test/parser_test.rb in trac-wiki-0.3.33

- old
+ new

@@ -605,14 +605,15 @@ # 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) - tc("<p><a href=\"ahoj\"><img alt=\"a%22tag%22\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=ahoj)]]", :no_link=>true) - tc("<p><a href=\"javascript%253Aalert%2528666%2529\"><img alt=\"a%22tag%22\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=javascript:alert(666))]]", :no_link=>true) + tc("<p><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]") + tc("<p><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg,alt=a\"tag\")]]", :no_link=>true) + tc("<p><a href=\"ahoj\"><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=ahoj)]]", :no_link=>true) + tc("<p><a href=\"ahoj/bhoj\"><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=ahoj/bhoj)]]", :no_escape => true, :no_link=>true) + tc("<p><a href=\"javascript%3Aalert%28666%29\"><img alt=\"a&quot;tag&quot;\" src=\"image.jpg\"/></a></p>\n", "[[Image(image.jpg,alt=a\"tag\",link=javascript:alert(666))]]", :no_link=>true) # Malicious links should not be converted. tc("<p><a href=\"javascript%3Aalert%28%22Boo%21%22%29\">Click</a></p>\n", "[[javascript:alert(\"Boo!\")|Click]]") end @@ -882,10 +883,10 @@ tc("<p><img src=\"image.jpg\" valign=\"top\"/></p>\n", "[[Image(image.jpg, valign=top)]]") tc("<p><img align=\"center\" src=\"image.jpg\"/></p>\n", "[[Image(image.jpg, center)]]") tc("<p><img src=\"image.jpg\" valign=\"middle\"/></p>\n", "[[Image(image.jpg, middle)]]") tc("<p><img src=\"image.jpg\" title=\"houhouhou\"/></p>\n", "[[Image(image.jpg, title=houhouhou)]]") tc("<p><img src=\"image.jpg\" width=\"120px\"/></p>\n", "[[Image(image.jpg,width=120px)]]") - tc("<p><img src=\"image.jpg\" width=\"120%25\"/></p>\n", "[[Image(image.jpg, width=120%)]]") + tc("<p><img src=\"image.jpg\" width=\"120%\"/></p>\n", "[[Image(image.jpg, width=120%)]]") tc("<p><img src=\"image.jpg\" style=\"margin:5\"/></p>\n", "[[Image(image.jpg,margin=5)]]") tc("<p><img src=\"http://example.org/image.jpg\"/></p>\n", "[[Image(http://example.org/image.jpg)]]") end it 'should parse bold combo' do