2006-12-19 Alex Roitman <shura@gramps-project.org>

* src/PluginUtils/_Options.py (save): Use unicode, not str.



svn: r7822
This commit is contained in:
Alex Roitman 2006-12-19 17:53:54 +00:00
parent 216519bab5
commit 982c4cf9a6
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,6 @@
2006-12-19 Alex Roitman <shura@gramps-project.org>
* src/PluginUtils/_Options.py (save): Use unicode, not str.
2006-12-18 Alex Roitman <shura@gramps-project.org> 2006-12-18 Alex Roitman <shura@gramps-project.org>
* src/PluginUtils/_Options.py (save): Escape special characters. * src/PluginUtils/_Options.py (save): Escape special characters.

View File

@ -206,12 +206,12 @@ class OptionListCollection:
for list_index in range(len(options[option_name])): for list_index in range(len(options[option_name])):
f.write(' <listitem number="%d" value="%s"/>\n' % ( f.write(' <listitem number="%d" value="%s"/>\n' % (
list_index, list_index,
escape(str(options[option_name][list_index]))) ) escape(unicode(options[option_name][list_index]))) )
f.write(' </option>\n') f.write(' </option>\n')
else: else:
f.write(' <option name="%s" value="%s"/>\n' % ( f.write(' <option name="%s" value="%s"/>\n' % (
escape(option_name), escape(option_name),
escape(str(options[option_name]))) ) escape(unicode(options[option_name]))) )
self.write_module_common(f,option_list) self.write_module_common(f,option_list)