##// END OF EJS Templates
Less aggressive textile image tag parsing (#3209)....
Jean-Philippe Lang -
r2585:6bb550838777
parent child
Show More
@@ -907,7 +907,7 class RedCloth3 < String
907 907 end
908 908
909 909 IMAGE_RE = /
910 (<p>|.|^) # start of line?
910 (<p>|\s|^) # start of line?
911 911 \! # opening
912 912 (\<|\=|\>)? # optional alignment atts
913 913 (#{C}) # optional style,class atts
@@ -57,6 +57,8 class ApplicationHelperTest < HelperTestCase
57 57 'ftp://foo.bar' => '<a class="external" href="ftp://foo.bar">ftp://foo.bar</a>',
58 58 'ftps://foo.bar' => '<a class="external" href="ftps://foo.bar">ftps://foo.bar</a>',
59 59 'sftp://foo.bar' => '<a class="external" href="sftp://foo.bar">sftp://foo.bar</a>',
60 # two exclamation marks
61 'http://example.net/path!602815048C7B5C20!302.html' => '<a class="external" href="http://example.net/path!602815048C7B5C20!302.html">http://example.net/path!602815048C7B5C20!302.html</a>',
60 62 }
61 63 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
62 64 end
@@ -110,6 +112,8 class ApplicationHelperTest < HelperTestCase
110 112 "This is a double quote \"on the first line\nand another on a second line\":test" => "This is a double quote \"on the first line<br />\nand another on a second line\":test",
111 113 # mailto link
112 114 "\"system administrator\":mailto:sysadmin@example.com?subject=redmine%20permissions" => "<a href=\"mailto:sysadmin@example.com?subject=redmine%20permissions\">system administrator</a>",
115 # two exclamation marks
116 '"a link":http://example.net/path!602815048C7B5C20!302.html' => '<a href="http://example.net/path!602815048C7B5C20!302.html" class="external">a link</a>',
113 117 }
114 118 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
115 119 end
General Comments 0
You need to be logged in to leave comments. Login now