2974: .rtf docgen doesn't escape backslashes
svn: r22704
This commit is contained in:
parent
429c8e655d
commit
a7b4600ad0
@ -477,7 +477,6 @@ class RTFDoc(BaseDoc,TextDoc):
|
|||||||
def write_text(self, text, mark=None, links=False):
|
def write_text(self, text, mark=None, links=False):
|
||||||
# Convert to unicode, just in case it's not. Fix of bug 2449.
|
# Convert to unicode, just in case it's not. Fix of bug 2449.
|
||||||
text = cuni(text)
|
text = cuni(text)
|
||||||
text = text.replace('\n','\n\\par ')
|
|
||||||
LOG.debug("write_text: opened: %d input text: %s" %
|
LOG.debug("write_text: opened: %d input text: %s" %
|
||||||
(self.opened,
|
(self.opened,
|
||||||
text))
|
text))
|
||||||
@ -493,7 +492,9 @@ class RTFDoc(BaseDoc,TextDoc):
|
|||||||
# If (uni)code with more than 8 bits:
|
# If (uni)code with more than 8 bits:
|
||||||
# RTF req valus in decimal, not hex.
|
# RTF req valus in decimal, not hex.
|
||||||
self.text += '{\\uc1\\u%d\\uc0}' % ord(i)
|
self.text += '{\\uc1\\u%d\\uc0}' % ord(i)
|
||||||
elif i == '{' or i == '}' :
|
elif i == '\n':
|
||||||
|
self.text += '\n\\par ';
|
||||||
|
elif i == '{' or i == '}' or i == '\\':
|
||||||
self.text += '\\%s' % i
|
self.text += '\\%s' % i
|
||||||
else:
|
else:
|
||||||
self.text += i
|
self.text += i
|
||||||
|
Loading…
Reference in New Issue
Block a user