From f37005c7066bc119959a63ab3edca89d04d1bcb0 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 19 Dec 2006 04:53:42 +0000 Subject: [PATCH] 2006-12-18 Alex Roitman * src/PluginUtils/_Options.py (save): Escape special characters. svn: r7818 --- gramps2/ChangeLog | 3 +++ gramps2/src/PluginUtils/_Options.py | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 9bf9ef818..56a7b4c67 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2006-12-18 Alex Roitman + * src/PluginUtils/_Options.py (save): Escape special characters. + 2006-12-18 Don Allingham * src/DataViews/_PersonView.py: exact search for gender (bug #633) * src/DisplayModels/_PeopleModel.py: exact search for gender (bug #633) diff --git a/gramps2/src/PluginUtils/_Options.py b/gramps2/src/PluginUtils/_Options.py index a58e875d6..f5deaf10b 100644 --- a/gramps2/src/PluginUtils/_Options.py +++ b/gramps2/src/PluginUtils/_Options.py @@ -39,8 +39,10 @@ import os #------------------------------------------------------------------------- try: from xml.sax import make_parser,handler,SAXParseException + from xml.sax.saxutils import escape except: from _xmlplus.sax import make_parser,handler,SAXParseException + from _xmlplus.sax.saxutils import escape #------------------------------------------------------------------------- # @@ -194,19 +196,22 @@ class OptionListCollection: for module_name in self.get_module_names(): option_list = self.get_option_list(module_name) - f.write('\n' % module_name) + f.write('\n' % escape(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('