diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 14b2533c0..5a2aee81d 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/BaseDoc.py b/gramps2/src/BaseDoc.py index 4ca70f1cb..d0dde455e 100644 --- a/gramps2/src/BaseDoc.py +++ b/gramps2/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('