From 49e2ef5267e86d96a756315f503fd57ba0483451 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 --- gramps2/ChangeLog | 4 ++++ gramps2/src/PluginUtils/_Options.py | 13 ++++++++----- gramps2/src/plugins/BookReport.py | 19 ++++++++++++------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5b50a8e47..b3423c934 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/PluginUtils/_Options.py b/gramps2/src/PluginUtils/_Options.py index 6ece552eb..f6be5cfb3 100644 --- a/gramps2/src/PluginUtils/_Options.py +++ b/gramps2/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('