Don't turn #nnn with leading zeros into link (#11494).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10077 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-24 21:51:10 +00:00
parent 3209c4c5e4
commit 28cdc8adfc
2 changed files with 3 additions and 1 deletions

View 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,

View 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}.",