From 59567076ce7346f072edf3c9ac73840e65d1a932 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 --- gramps2/ChangeLog | 3 +++ gramps2/src/docgen/OpenOfficeDoc.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index d4018cd5c..87792cdfe 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/docgen/OpenOfficeDoc.py b/gramps2/src/docgen/OpenOfficeDoc.py index d1065f52f..79edd86a6 100644 --- a/gramps2/src/docgen/OpenOfficeDoc.py +++ b/gramps2/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)