]> source.dussan.org Git - redmine.git/commitdiff
Turn ftp urls into links (#1514).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 23 Jun 2008 16:51:13 +0000 (16:51 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 23 Jun 2008 16:51:13 +0000 (16:51 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1577 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting.rb
test/unit/helpers/application_helper_test.rb

index 6c8eebbbc418bc9dae079f52ee71fad4673e9410..952f636d34866cc5969aa277c03bbd85ce82acb4 100644 (file)
@@ -129,6 +129,7 @@ module Redmine
                         )
                         (
                           (?:https?://)|           # protocol spec, or
+                          (?:ftp://)|
                           (?:www\.)                # www.*
                         )
                         (
index 9504a8c797a044fdbf3d7dd5b82bab8923644591..45eb2df906a71bcd94075b7efc1567cb4d40871b 100644 (file)
@@ -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