scm: mercurial: change template "escape" to "urlescape" for "author" and "desc" (#23055)

git-svn-id: http://svn.redmine.org/redmine/trunk@19606 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2020-03-22 16:15:25 +00:00
parent 28f91a7332
commit 20ab5cb4dd
2 changed files with 9 additions and 7 deletions

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

View 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