Skip to content

Commit

Permalink
Builder: Use CDATA to encode characters in the XML feed
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 12, 2013
1 parent eb1bdf5 commit 215c2e7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions distrib/builder/changes.py
Expand Up @@ -19,9 +19,15 @@ def encodedText(logText):


def xmlEncodedText(logText):
logText = logText.replace('<', '&lt;')
logText = logText.replace('>', '&gt;')
return logText
result = ''
for c in logText:
if c == '<':
result += '<![CDATA[<]]>'
elif c == '>':
result += '<![CDATA[>]]>'
else:
result += c
return result


class Entry:
Expand Down

0 comments on commit 215c2e7

Please sign in to comment.