diff options
-rw-r--r-- | lib/redmine/wiki_formatting/textile/redcloth3.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index d33aede8d..80e0a3626 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -350,7 +350,7 @@ class RedCloth3 < String PUNCT = Regexp::quote( '!"#$%&\'*+,-./:;=?@\\^_`|~' ) PUNCT_NOQ = Regexp::quote( '!"#$&\',./:;=?@\\`|' ) PUNCT_Q = Regexp::quote( '*-_+^~%' ) - HYPERLINK = '(\S+?)([^\w\s/;=\?]*?)(?=\s|<|$)' + HYPERLINK = '(?=\/|https?:\/\/|s?ftps?:\/\/|www\.|mailto:)(\S+?)([^\w\s/;=\?]*?)(?=\s|<|$)' # Text markup tags, don't conflict with block tags SIMPLE_HTML_TAGS = [ @@ -815,7 +815,7 @@ class RedCloth3 < String (?:\(([^)]+?)\)(?="))? # $title ": ( # $url - (\/|[a-zA-Z]+:\/\/|www\.|mailto:) # $proto + (\/|https?:\/\/|s?ftps?:\/\/|www\.|mailto:) # $proto [[:alnum:]_\/]\S+? ) (\/)? # $slash |