]> source.dussan.org Git - redmine.git/commitdiff
Fixed commit link title escaping (fixes #13405).
authorEtienne Massip <etienne.massip@gmail.com>
Thu, 21 Mar 2013 21:53:28 +0000 (21:53 +0000)
committerEtienne Massip <etienne.massip@gmail.com>
Thu, 21 Mar 2013 21:53:28 +0000 (21:53 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11671 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb
test/fixtures/changesets.yml
test/unit/helpers/application_helper_test.rb

index 12bf00da2c7c97b2533d9125f3c69fe70340ce79..7c9aef0593e9d9afd4cf72efc957b0b8d9b6d122 100644 (file)
@@ -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)
index 08f8c79c88a654c95484249c4c37b6b7df40d800..e6b26fc9ec4a60dd3702d0c2b137abc3b996cbaf 100644 (file)
@@ -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
index 17219cf2a8ab42d0dfc5ba6271ad05990bc685fd..5635c290b45b6dd029e60c78022cd291db9ac2bb 100644 (file)
@@ -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,