From 736b54991043cb76ceea46564b984fc8832a3602 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 28 Jan 2007 05:08:49 +0000 Subject: [PATCH] * src/ReportBase/_ReportOptions.py: (#877) escape XML constructs * src/BaseDoc.py: escape XML constructs svn: r8000 --- ChangeLog | 2 ++ src/BaseDoc.py | 10 +++++++--- src/ReportBase/_ReportOptions.py | 22 +++++++++++++--------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14b2533c0..5a2aee81d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2007-01-27 Don Allingham + * src/ReportBase/_ReportOptions.py: (#877) escape XML constructs + * src/BaseDoc.py: escape XML constructs * src/DataViews/_PersonView.py: add enter to collapse row as well 2007-01-27 Benny Malengier diff --git a/src/BaseDoc.py b/src/BaseDoc.py index 4ca70f1cb..d0dde455e 100644 --- a/src/BaseDoc.py +++ b/src/BaseDoc.py @@ -67,6 +67,10 @@ __revision__ = "Revision:$Id$" #------------------------------------------------------------------------- import os from math import pi, cos, sin +from xml.sax.saxutils import escape + +def escxml(d): + return escape(d, { '"' : '"' } ) #------------------------------------------------------------------------- # @@ -872,10 +876,10 @@ class StyleSheetList: if name == "default": continue sheet = self.map[name] - xml_file.write('\n' % name) + xml_file.write('\n' % escxml(name)) for p_name in sheet.get_names(): para = sheet.get_style(p_name) - xml_file.write('