From 740a436e7662829da5595b0827537e16812365af 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 --- ChangeLog | 3 +++ src/PluginUtils/_Options.py | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9bf9ef818..56a7b4c67 100644 --- a/ChangeLog +++ b/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/src/PluginUtils/_Options.py b/src/PluginUtils/_Options.py index a58e875d6..f5deaf10b 100644 --- a/src/PluginUtils/_Options.py +++ b/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('