diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 12bf00da2..7c9aef059 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -758,7 +758,7 @@ module ApplicationHelper if repository && (changeset = Changeset.visible.where("repository_id = ? AND scmid LIKE ?", repository.id, "#{name}%").first) link = link_to h("#{project_prefix}#{repo_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.identifier}, :class => 'changeset', - :title => truncate_single_line(h(changeset.comments), :length => 100) + :title => truncate_single_line(changeset.comments, :length => 100) end else if repository && User.current.allowed_to?(:browse_repository, project) diff --git a/test/fixtures/changesets.yml b/test/fixtures/changesets.yml index 08f8c79c8..e6b26fc9e 100644 --- a/test/fixtures/changesets.yml +++ b/test/fixtures/changesets.yml @@ -13,6 +13,7 @@ changesets_002: committed_on: 2007-04-12 15:14:44 +02:00 revision: 2 id: 101 + scmid: 691322a8eb01e11fd7 comments: 'This commit fixes #1, #2 and references #1 & #3' repository_id: 10 committer: dlopper diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 17219cf2a..5635c290b 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -264,9 +264,12 @@ RAW note_link = link_to('#3', {:controller => 'issues', :action => 'show', :id => 3, :anchor => 'note-14'}, :class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)') - changeset_link = link_to('r1', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 1}, + revision_link = link_to('r1', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 1}, :class => 'changeset', :title => 'My very first commit') - changeset_link2 = link_to('r2', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 2}, + revision_link2 = link_to('r2', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 2}, + :class => 'changeset', :title => 'This commit fixes #1, #2 and references #1 & #3') + + changeset_link2 = link_to('691322a8eb01e11fd7', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 2}, :class => 'changeset', :title => 'This commit fixes #1, #2 and references #1 & #3') document_link = link_to('Test document', {:controller => 'documents', :action => 'show', :id => 1}, @@ -304,10 +307,11 @@ RAW # should not ignore leading zero '#03' => '#03', # changesets - 'r1' => changeset_link, - 'r1.' => "#{changeset_link}.", - 'r1, r2' => "#{changeset_link}, #{changeset_link2}", - 'r1,r2' => "#{changeset_link},#{changeset_link2}", + 'r1' => revision_link, + 'r1.' => "#{revision_link}.", + 'r1, r2' => "#{revision_link}, #{revision_link2}", + 'r1,r2' => "#{revision_link},#{revision_link2}", + 'commit:691322a8eb01e11fd7' => changeset_link2, # documents 'document#1' => document_link, 'document:"Test document"' => document_link,