@@ -95,7 +95,7 module Redmine | |||||
95 | (?:www\.) # www.* |
|
95 | (?:www\.) # www.* | |
96 | ) |
|
96 | ) | |
97 | ( |
|
97 | ( | |
98 |
(\S |
|
98 | ([^<]\S*?) # url | |
99 | (\/)? # slash |
|
99 | (\/)? # slash | |
100 | ) |
|
100 | ) | |
101 | ((?:>)?|[^[:alnum:]_\=\/;\(\)]*?) # post |
|
101 | ((?:>)?|[^[:alnum:]_\=\/;\(\)]*?) # post |
@@ -84,7 +84,10 class ApplicationHelperTest < ActionView::TestCase | |||||
84 | # escaping |
|
84 | # escaping | |
85 | 'http://foo"bar' => '<a class="external" href="http://foo"bar">http://foo"bar</a>', |
|
85 | 'http://foo"bar' => '<a class="external" href="http://foo"bar">http://foo"bar</a>', | |
86 | # wrap in angle brackets |
|
86 | # wrap in angle brackets | |
87 | '<http://foo.bar>' => '<<a class="external" href="http://foo.bar">http://foo.bar</a>>' |
|
87 | '<http://foo.bar>' => '<<a class="external" href="http://foo.bar">http://foo.bar</a>>', | |
|
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