]> source.dussan.org Git - redmine.git/commitdiff
Fixed: auto links ending with right angle bracket shouldn't include the bracket in...
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Sat, 23 Oct 2010 22:35:02 +0000 (22:35 +0000)
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Sat, 23 Oct 2010 22:35:02 +0000 (22:35 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4287 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index a622e80398520bb53191c1de2dcf922b993b3f1e..6794f82c79e4fb41ccc53b03727f889091cdd9dd 100644 (file)
@@ -121,7 +121,7 @@ module Redmine
                           (\S+?)                   # url
                           (\/)?                    # slash
                         )
-                        ([^\w\=\/;\(\)]*?)               # post
+                        ((?:&gt;)?|[^\w\=\/;\(\)]*?)               # post
                         (?=<|\s|$)
                        }x unless const_defined?(:AUTO_LINK_RE)
   
index d44bc00455fda2955318b0373af73e336399507d..83a508594004863f58a70de78d581557de3f50d9 100644 (file)
@@ -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