]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: change template "escape" to "urlescape" for "author" and "desc" ...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 22 Mar 2020 16:15:25 +0000 (16:15 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 22 Mar 2020 16:15:25 +0000 (16:15 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19606 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl
lib/redmine/scm/adapters/mercurial_adapter.rb

index b5b4e9203b0645fe434e38d7eb6cc9e0fba7490e..4c3af5340329e41b6964d36e89d4362a7ad69aba 100644 (file)
@@ -1,7 +1,7 @@
 changeset = 'This template must be used with --debug option\n'
 changeset_quiet =  'This template must be used with --debug option\n'
 changeset_verbose = 'This template must be used with --debug option\n'
-changeset_debug = '<logentry revision="{rev}" node="{node}">\n<author>{author|escape}</author>\n<date>{date|isodatesec}</date>\n<paths>\n{file_mods}{file_adds}{file_dels}{file_copies}</paths>\n<msg>{desc|escape}</msg>\n<parents>\n{parents}</parents>\n</logentry>\n\n'
+changeset_debug = '<logentry revision="{rev}" node="{node}">\n<author>{author|urlescape}</author>\n<date>{date|isodatesec}</date>\n<paths>\n{file_mods}{file_adds}{file_dels}{file_copies}</paths>\n<msg>{desc|urlescape}</msg>\n<parents>\n{parents}</parents>\n</logentry>\n\n'
 
 file_mod = '<path action="M">{file_mod|urlescape}</path>\n'
 file_add = '<path action="A">{file_add|urlescape}</path>\n'
index f58021dde5fd5d6f01a58cfc22e8d1843182a393..81f23c14e0bbd1dab0068dd2e1ee8d9212a44969 100644 (file)
@@ -220,13 +220,15 @@ module Redmine
             yield Revision.new(:revision => le['revision'],
                                :scmid    => le['node'],
                                :author   =>
-                                         (begin
-                                            le['author']['__content__']
-                                          rescue
-                                            ''
-                                          end),
+                                           CGI.unescape(
+                                             (begin
+                                                le['author']['__content__']
+                                              rescue
+                                                ''
+                                              end)
+                                            ),
                                :time     => Time.parse(le['date']['__content__']),
-                               :message  => le['msg']['__content__'],
+                               :message  => CGI.unescape(le['msg']['__content__']),
                                :paths    => paths,
                                :parents  => parents_ary)
           end