Merged r11473 from trunk (#3676).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11564 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-03-09 09:14:22 +00:00
parent 511099e9ca
commit 998a29cbaf
2 changed files with 5 additions and 2 deletions

View File

@ -95,7 +95,7 @@ module Redmine
(?:www\.) # www.*
)
(
(\S+?) # url
([^<]\S*?) # url
(\/)? # slash
)
((?:&gt;)?|[^[:alnum:]_\=\/;\(\)]*?) # post

View File

@ -84,7 +84,10 @@ class ApplicationHelperTest < ActionView::TestCase
# escaping
'http://foo"bar' => '<a class="external" href="http://foo&quot;bar">http://foo&quot;bar</a>',
# wrap in angle brackets
'<http://foo.bar>' => '&lt;<a class="external" href="http://foo.bar">http://foo.bar</a>&gt;'
'<http://foo.bar>' => '&lt;<a class="external" href="http://foo.bar">http://foo.bar</a>&gt;',
# invalid urls
'http://' => 'http://',
'www.' => 'www.',
}
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
end