diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb index c936803d..1a198233 100644 --- a/lib/redmine/wiki_formatting/textile/formatter.rb +++ b/lib/redmine/wiki_formatting/textile/formatter.rb @@ -135,7 +135,7 @@ module Redmine ) ( (?:https?://)| # protocol spec, or - (?:ftp://)| + (?:s?ftps?://)| (?:www\.) # www.* ) ( diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 00e9b0a6..087d9631 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -36,6 +36,7 @@ class ApplicationHelperTest < HelperTestCase 'http://foo.bar' => 'http://foo.bar', 'http://foo.bar/~user' => 'http://foo.bar/~user', 'http://foo.bar.' => 'http://foo.bar.', + 'https://foo.bar.' => 'https://foo.bar.', 'This is a link: http://foo.bar.' => 'This is a link: http://foo.bar.', 'A link (eg. http://foo.bar).' => 'A link (eg. http://foo.bar).', 'http://foo.bar/foo.bar#foo.bar.' => 'http://foo.bar/foo.bar#foo.bar.', @@ -52,6 +53,8 @@ class ApplicationHelperTest < HelperTestCase 'http://foo@www.bar.com' => 'http://foo@www.bar.com', 'http://foo:bar@www.bar.com' => 'http://foo:bar@www.bar.com', 'ftp://foo.bar' => 'ftp://foo.bar', + 'ftps://foo.bar' => 'ftps://foo.bar', + 'sftp://foo.bar' => 'sftp://foo.bar', } to_test.each { |text, result| assert_equal "
#{result}
", textilizable(text) } end