summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-10-31 23:56:10 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-10-31 23:56:10 +0000
commita04bbfb16575f43b030f00d6b0e49d0bab46a90c (patch)
treeeeb44b779d1d912dc75bc45b49a3bb319eb8bb14
parent494c149df63de1b2483a28ff050ff37309d859b3 (diff)
downloadredmine-a04bbfb16575f43b030f00d6b0e49d0bab46a90c.tar.gz
redmine-a04bbfb16575f43b030f00d6b0e49d0bab46a90c.zip
Merged r4287 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4327 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/wiki_formatting/textile/formatter.rb2
-rw-r--r--test/unit/helpers/application_helper_test.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb
index a622e8039..6794f82c7 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
+ ((?:&gt;)?|[^\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 ad2be56aa..16ef60182 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' => '<a class="external" href="http://example.net/path!602815048C7B5C20!302.html">http://example.net/path!602815048C7B5C20!302.html</a>',
# escaping
'http://foo"bar' => '<a class="external" href="http://foo&quot;bar">http://foo"bar</a>',
+ # wrap in angle brackets
+ '<http://foo.bar>' => '&lt;<a class="external" href="http://foo.bar">http://foo.bar</a>&gt;'
}
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
end