mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 09:36:21 +01:00
fix get_commitlog to decode correct.
get_commitlog mixes bytes and strings when the output is xml or csv. This is fixed by decoding the commit message before replacing chars.
This commit is contained in:
parent
c5139fdff8
commit
03777b7e4d
@ -6330,7 +6330,7 @@ def get_commitlog(apiurl, prj, package, revision, format = 'text', meta = False,
|
||||
|
||||
if format == 'csv':
|
||||
s = '%s|%s|%s|%s|%s|%s|%s' % (rev, user, t, srcmd5, version,
|
||||
comment.replace('\\', '\\\\').replace('\n', '\\n').replace('|', '\\|'), requestid)
|
||||
decode_it(comment).replace('\\', '\\\\').replace('\n', '\\n').replace('|', '\\|'), requestid)
|
||||
r.append(s)
|
||||
elif format == 'xml':
|
||||
r.append('<logentry')
|
||||
@ -6339,7 +6339,7 @@ def get_commitlog(apiurl, prj, package, revision, format = 'text', meta = False,
|
||||
r.append('<date>%s</date>' % t)
|
||||
r.append('<requestid>%s</requestid>' % requestid)
|
||||
r.append('<msg>%s</msg>' %
|
||||
comment.replace('&', '&').replace('<', '>').replace('>', '<'))
|
||||
decode_it(comment).replace('&', '&').replace('<', '>').replace('>', '<'))
|
||||
r.append('</logentry>')
|
||||
else:
|
||||
if requestid:
|
||||
|
Loading…
Reference in New Issue
Block a user