]> source.dussan.org Git - redmine.git/commitdiff
Don't turn #nnn with leading zeros into link (#11494).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 24 Jul 2012 21:51:10 +0000 (21:51 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 24 Jul 2012 21:51:10 +0000 (21:51 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10077 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb
test/unit/helpers/application_helper_test.rb

index a20b8d69313f30ccb5445e2349f78336858794ba..f97cc06386dca9ee09fc7e6fdedae054106c265f 100644 (file)
@@ -703,7 +703,7 @@ module ApplicationHelper
           oid = identifier.to_i
           case prefix
           when nil
-            if issue = Issue.visible.find_by_id(oid, :include => :status)
+            if oid.to_s == identifier && issue = Issue.visible.find_by_id(oid, :include => :status)
               anchor = comment_id ? "note-#{comment_id}" : nil
               link = link_to("##{oid}", {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor},
                                         :class => issue.css_classes,
index 8b22df08afdc562a5f8cb925220cb69df6437fc1..1740fbc52c4beeb4f8454a2b53220343bc22508e 100644 (file)
@@ -260,6 +260,8 @@ RAW
       # ticket notes
       '#3-14'                       => note_link,
       '#3#note-14'                  => note_link,
+      # should not ignore leading zero
+      '#03'                         => '#03',
       # changesets
       'r1'                          => changeset_link,
       'r1.'                         => "#{changeset_link}.",