From d642964035e6be4687c37e9e01af4b5590580396 2010-10-23 22:35:02 From: Jean-Baptiste Barth Date: 2010-10-23 22:35:02 Subject: [PATCH] Fixed: auto links ending with right angle bracket shouldn't include the bracket in the URL. #5652 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4287 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb index a622e80..6794f82 100644 --- a/lib/redmine/wiki_formatting/textile/formatter.rb +++ b/lib/redmine/wiki_formatting/textile/formatter.rb @@ -121,7 +121,7 @@ module Redmine (\S+?) # url (\/)? # slash ) - ([^\w\=\/;\(\)]*?) # post + ((?:>)?|[^\w\=\/;\(\)]*?) # post (?=<|\s|$) }x unless const_defined?(:AUTO_LINK_RE) diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index d44bc00..83a5085 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -79,6 +79,8 @@ class ApplicationHelperTest < ActionView::TestCase 'http://example.net/path!602815048C7B5C20!302.html' => 'http://example.net/path!602815048C7B5C20!302.html', # escaping 'http://foo"bar' => 'http://foo"bar', + # wrap in angle brackets + '' => '<http://foo.bar>' } to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end