Commit 28c094f5 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Turn ftp urls into links (#1514).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1577 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 0d5b03ba
......@@ -129,6 +129,7 @@ module Redmine
)
(
(?:https?://)| # protocol spec, or
(?:ftp://)|
(?:www\.) # www.*
)
(
......
......@@ -36,6 +36,7 @@ class ApplicationHelperTest < HelperTestCase
'http://foo.bar/page?p=1&t=z&s=' => '<a class="external" href="http://foo.bar/page?p=1&#38;t=z&#38;s=">http://foo.bar/page?p=1&#38;t=z&#38;s=</a>',
'http://foo.bar/page#125' => '<a class="external" href="http://foo.bar/page#125">http://foo.bar/page#125</a>',
'http://foo@www.bar.com' => '<a class="external" href="http://foo@www.bar.com">http://foo@www.bar.com</a>',
'ftp://foo.bar' => '<a class="external" href="ftp://foo.bar">ftp://foo.bar</a>',
}
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment