Fix bug #791805: RTF output does not handle { and } properly.

This commit is contained in:
John Schember 2011-06-02 20:31:27 -04:00
parent 48db3defcf
commit ae96797d33

View File

@ -68,8 +68,13 @@ TODO:
'''
def txt2rtf(text):
# Escape { and } in the text.
text = text.replace('{', r'\'7b')
text = text.replace('}', r'\'7d')
if not isinstance(text, unicode):
return text
buf = cStringIO.StringIO()
for x in text:
val = ord(x)