changeset_verbose = 'This template must be used with --debug option\n'
changeset_debug = '<logentry revision="{rev}" node="{node|short}">\n<author>{author|escape}</author>\n<date>{date|isodate}</date>\n<paths>\n{files}{file_adds}{file_dels}{file_copies}</paths>\n<msg>{desc|escape}</msg>\n{tags}</logentry>\n\n'
-file = '<path action="M">{file|escape}</path>\n'
-file_add = '<path action="A">{file_add|escape}</path>\n'
-file_del = '<path action="D">{file_del|escape}</path>\n'
-file_copy = '<path-copied copyfrom-path="{source|escape}">{name|urlescape}</path-copied>\n'
+file = '<path action="M">{file|urlescape}</path>\n'
+file_add = '<path action="A">{file_add|urlescape}</path>\n'
+file_del = '<path action="D">{file_del|urlescape}</path>\n'
+file_copy = '<path-copied copyfrom-path="{source|urlescape}">{name|urlescape}</path-copied>\n'
tag = '<tag>{tag|escape}</tag>\n'
header='<?xml version="1.0" encoding="UTF-8" ?>\n<log>\n\n'
# footer="</log>"
\ No newline at end of file
changeset_verbose = 'This template must be used with --debug option\n'
changeset_debug = '<logentry revision="{rev}" node="{node|short}">\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{tags}</logentry>\n\n'
-file_mod = '<path action="M">{file_mod|escape}</path>\n'
-file_add = '<path action="A">{file_add|escape}</path>\n'
-file_del = '<path action="D">{file_del|escape}</path>\n'
-file_copy = '<path-copied copyfrom-path="{source|escape}">{name|urlescape}</path-copied>\n'
+file_mod = '<path action="M">{file_mod|urlescape}</path>\n'
+file_add = '<path action="A">{file_add|urlescape}</path>\n'
+file_del = '<path action="D">{file_del|urlescape}</path>\n'
+file_copy = '<path-copied copyfrom-path="{source|urlescape}">{name|urlescape}</path-copied>\n'
tag = '<tag>{tag|escape}</tag>\n'
header='<?xml version="1.0" encoding="UTF-8" ?>\n<log>\n\n'
# footer="</log>"
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require 'redmine/scm/adapters/abstract_adapter'
+require 'cgi'
module Redmine
module Scm
from_rev = logentry.attributes['revision']
end
paths << {:action => path.attributes['action'],
- :path => "/#{path.text}",
- :from_path => from_path ? "/#{from_path}" : nil,
+ :path => "/#{CGI.unescape(path.text)}",
+ :from_path => from_path ? "/#{CGI.unescape(from_path)}" : nil,
:from_revision => from_rev ? from_rev : nil
}
end