##// END OF EJS Templates
Fixed: auto links ending with right angle bracket shouldn't include the bracket in the URL. #5652...
Jean-Baptiste Barth -
r4173:d642964035e6
parent child
Show More
@@ -121,7 +121,7 module Redmine
121 (\S+?) # url
121 (\S+?) # url
122 (\/)? # slash
122 (\/)? # slash
123 )
123 )
124 ([^\w\=\/;\(\)]*?) # post
124 ((?:>)?|[^\w\=\/;\(\)]*?) # post
125 (?=<|\s|$)
125 (?=<|\s|$)
126 }x unless const_defined?(:AUTO_LINK_RE)
126 }x unless const_defined?(:AUTO_LINK_RE)
127
127
@@ -79,6 +79,8 class ApplicationHelperTest < ActionView::TestCase
79 '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>',
79 '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>',
80 # escaping
80 # escaping
81 'http://foo"bar' => '<a class="external" href="http://foo&quot;bar">http://foo"bar</a>',
81 'http://foo"bar' => '<a class="external" href="http://foo&quot;bar">http://foo"bar</a>',
82 # wrap in angle brackets
83 '<http://foo.bar>' => '&lt;<a class="external" href="http://foo.bar">http://foo.bar</a>&gt;'
82 }
84 }
83 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
85 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
84 end
86 end
General Comments 0
You need to be logged in to leave comments. Login now