@@ -135,7 +135,7 module Redmine | |||||
135 | ) |
|
135 | ) | |
136 | ( |
|
136 | ( | |
137 | (?:https?://)| # protocol spec, or |
|
137 | (?:https?://)| # protocol spec, or | |
138 | (?:ftp://)| |
|
138 | (?:s?ftps?://)| | |
139 | (?:www\.) # www.* |
|
139 | (?:www\.) # www.* | |
140 | ) |
|
140 | ) | |
141 | ( |
|
141 | ( |
@@ -36,6 +36,7 class ApplicationHelperTest < HelperTestCase | |||||
36 | 'http://foo.bar' => '<a class="external" href="http://foo.bar">http://foo.bar</a>', |
|
36 | 'http://foo.bar' => '<a class="external" href="http://foo.bar">http://foo.bar</a>', | |
37 | 'http://foo.bar/~user' => '<a class="external" href="http://foo.bar/~user">http://foo.bar/~user</a>', |
|
37 | 'http://foo.bar/~user' => '<a class="external" href="http://foo.bar/~user">http://foo.bar/~user</a>', | |
38 | 'http://foo.bar.' => '<a class="external" href="http://foo.bar">http://foo.bar</a>.', |
|
38 | 'http://foo.bar.' => '<a class="external" href="http://foo.bar">http://foo.bar</a>.', | |
|
39 | 'https://foo.bar.' => '<a class="external" href="https://foo.bar">https://foo.bar</a>.', | |||
39 | 'This is a link: http://foo.bar.' => 'This is a link: <a class="external" href="http://foo.bar">http://foo.bar</a>.', |
|
40 | 'This is a link: http://foo.bar.' => 'This is a link: <a class="external" href="http://foo.bar">http://foo.bar</a>.', | |
40 | 'A link (eg. http://foo.bar).' => 'A link (eg. <a class="external" href="http://foo.bar">http://foo.bar</a>).', |
|
41 | 'A link (eg. http://foo.bar).' => 'A link (eg. <a class="external" href="http://foo.bar">http://foo.bar</a>).', | |
41 | 'http://foo.bar/foo.bar#foo.bar.' => '<a class="external" href="http://foo.bar/foo.bar#foo.bar">http://foo.bar/foo.bar#foo.bar</a>.', |
|
42 | 'http://foo.bar/foo.bar#foo.bar.' => '<a class="external" href="http://foo.bar/foo.bar#foo.bar">http://foo.bar/foo.bar#foo.bar</a>.', | |
@@ -52,6 +53,8 class ApplicationHelperTest < HelperTestCase | |||||
52 | 'http://foo@www.bar.com' => '<a class="external" href="http://foo@www.bar.com">http://foo@www.bar.com</a>', |
|
53 | 'http://foo@www.bar.com' => '<a class="external" href="http://foo@www.bar.com">http://foo@www.bar.com</a>', | |
53 | 'http://foo:bar@www.bar.com' => '<a class="external" href="http://foo:bar@www.bar.com">http://foo:bar@www.bar.com</a>', |
|
54 | 'http://foo:bar@www.bar.com' => '<a class="external" href="http://foo:bar@www.bar.com">http://foo:bar@www.bar.com</a>', | |
54 | 'ftp://foo.bar' => '<a class="external" href="ftp://foo.bar">ftp://foo.bar</a>', |
|
55 | 'ftp://foo.bar' => '<a class="external" href="ftp://foo.bar">ftp://foo.bar</a>', | |
|
56 | 'ftps://foo.bar' => '<a class="external" href="ftps://foo.bar">ftps://foo.bar</a>', | |||
|
57 | 'sftp://foo.bar' => '<a class="external" href="sftp://foo.bar">sftp://foo.bar</a>', | |||
55 | } |
|
58 | } | |
56 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } |
|
59 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } | |
57 | end |
|
60 | end |
General Comments 0
You need to be logged in to leave comments.
Login now