From 60a072824fbd28bd09f54142fc6db10d3a4f6f69 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 19 Apr 2007 02:03:29 +0000 Subject: [PATCH] 2007-04-18 Don Allingham * src/plugins/BookReport.py: escape xml constructs (bug 877) * src/PluginUtils/_Options.py: escape xml constructs (bug 877) svn: r8403 --- ChangeLog | 4 ++++ src/PluginUtils/_Options.py | 13 ++++++++----- src/plugins/BookReport.py | 19 ++++++++++++------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b50a8e47..b3423c934 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-04-18 Don Allingham + * src/plugins/BookReport.py: escape xml constructs (bug 877) + * src/PluginUtils/_Options.py: escape xml constructs (bug 877) + 2007-04-17 Don Allingham * src/Editors/_EditRepository.py: fix double click save bug * src/Editors/_EditSource.py: fix double click save bug diff --git a/src/PluginUtils/_Options.py b/src/PluginUtils/_Options.py index 6ece552eb..f6be5cfb3 100644 --- a/src/PluginUtils/_Options.py +++ b/src/PluginUtils/_Options.py @@ -44,6 +44,9 @@ except: from _xmlplus.sax import make_parser,handler,SAXParseException from _xmlplus.sax.saxutils import escape +def escxml(d): + return escape(d, { '"' : '"' } ) + #------------------------------------------------------------------------- # # gramps modules @@ -196,22 +199,22 @@ class OptionListCollection: for module_name in self.get_module_names(): option_list = self.get_option_list(module_name) - f.write('\n' % escape(module_name)) + f.write('\n' % escxml(module_name)) options = option_list.get_options() for option_name in options.keys(): if type(options[option_name]) in (type(list()),type(tuple())): f.write(' \n') else: f.write('