##// END OF EJS Templates
Fixed that www followed by a dot generates broken links in formatted text (#3676)....
Jean-Philippe Lang -
r11243:dfca67d844ca
parent child
Show More
@@ -95,7 +95,7 module Redmine
95 (?:www\.) # www.*
95 (?:www\.) # www.*
96 )
96 )
97 (
97 (
98 (\S+?) # url
98 ([^<]\S*?) # url
99 (\/)? # slash
99 (\/)? # slash
100 )
100 )
101 ((?:&gt;)?|[^[:alnum:]_\=\/;\(\)]*?) # post
101 ((?:&gt;)?|[^[:alnum:]_\=\/;\(\)]*?) # post
@@ -84,7 +84,10 class ApplicationHelperTest < ActionView::TestCase
84 # escaping
84 # escaping
85 'http://foo"bar' => '<a class="external" href="http://foo&quot;bar">http://foo&quot;bar</a>',
85 'http://foo"bar' => '<a class="external" href="http://foo&quot;bar">http://foo&quot;bar</a>',
86 # wrap in angle brackets
86 # wrap in angle brackets
87 '<http://foo.bar>' => '&lt;<a class="external" href="http://foo.bar">http://foo.bar</a>&gt;'
87 '<http://foo.bar>' => '&lt;<a class="external" href="http://foo.bar">http://foo.bar</a>&gt;',
88 # invalid urls
89 'http://' => 'http://',
90 'www.' => 'www.',
88 }
91 }
89 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
92 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
90 end
93 end
General Comments 0
You need to be logged in to leave comments. Login now