From dad0cc144eea562549600aa744ee1f6013048fc4 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 13 Jun 2003 15:13:47 +0000 Subject: [PATCH] * src/docgen/OpenOfficeDoc.py: Escape special XML characters. svn: r1720 --- ChangeLog | 3 +++ src/docgen/OpenOfficeDoc.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index d4018cd5c..87792cdfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2003-06-13 Tim Waugh + * src/docgen/OpenOfficeDoc.py: Escape special XML characters. + 2003-06-12 Tim Waugh * src/docgen/OpenOfficeDoc.py: Surround images by paragraph tags when inside the table cell. diff --git a/src/docgen/OpenOfficeDoc.py b/src/docgen/OpenOfficeDoc.py index d1065f52f..79edd86a6 100644 --- a/src/docgen/OpenOfficeDoc.py +++ b/src/docgen/OpenOfficeDoc.py @@ -521,6 +521,9 @@ class OpenOfficeDoc(TextDoc.TextDoc): self.new_cell = 1 def write_text(self,text): + text = string.replace(text,'&','&'); # Must be first + text = string.replace(text,'<','<'); + text = string.replace(text,'>','>'); text = string.replace(text,'\n','') self.f.write(text)