From 02dc2ce8689debe2c7fba2e7d81738458c37d3ac Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 9 Aug 2010 13:17:38 +0000 Subject: [PATCH] Name Format strings can have XML in them; now escaped- prevented valid XML from being written svn: r15692 --- src/plugins/export/ExportXml.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/export/ExportXml.py b/src/plugins/export/ExportXml.py index f1dd45165..4e8264e52 100644 --- a/src/plugins/export/ExportXml.py +++ b/src/plugins/export/ExportXml.py @@ -81,7 +81,11 @@ except: strip_dict = dict.fromkeys(range(9)+range(12,20)) def escxml(d): - return escape(d, { '"' : '"' } ) + return escape(d, + {'"' : '"', + '<' : '<', + '>' : '>', + }) #------------------------------------------------------------------------- # @@ -375,7 +379,8 @@ class GrampsXmlWriter(UpdateCallback): for number, name,fmt_str,active in self.db.name_formats: self.g.write('%s\n' - % (' ', number, name, fmt_str, int(active)) ) + % (' ', number, + escxml(name), escxml(fmt_str), int(active)) ) self.g.write(" \n") def fix(self,line):