Navigation Menu

Skip to content

Commit

Permalink
Fixed|Builder: Unicode in commit author fields
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 22, 2013
1 parent c9da4db commit cea7687
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions distrib/builder/changes.py
Expand Up @@ -19,12 +19,12 @@ def encodedText(logText):


def xmlEncodedText(logText):
result = ''
result = u''
for c in logText:
if c == '<':
result += '<![CDATA[<]]>'
if c == u'<':
result += u'<![CDATA[<]]>'
elif c == '>':
result += '<![CDATA[>]]>'
result += u'<![CDATA[>]]>'
else:
result += c
return result
Expand Down Expand Up @@ -273,7 +273,7 @@ def generate(self, format):
for entry in self.entries:
print >> out, '<commit>'
print >> out, '<submitDate>%s</submitDate>' % entry.date
print >> out, '<author>%s</author>' % entry.author
out.write((u'<author>%s</author>\n' % xmlEncodedText(entry.author)).encode('utf-8'))
print >> out, '<repositoryUrl>%s</repositoryUrl>' % entry.link
print >> out, '<sha1>%s</sha1>' % entry.hash
if entry.tags or entry.guessedTags:
Expand Down

0 comments on commit cea7687

Please sign in to comment.