From 77fa72cc3527b815beeb808216980a910ca25827 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 9 Aug 2010 13:02:06 +0000 Subject: [PATCH] Name Format strings can have XML in them; now escaped- prevented valid XML from being written svn: r15691 --- 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 369968dd7..f7ffee567 100644 --- a/src/plugins/export/ExportXml.py +++ b/src/plugins/export/ExportXml.py @@ -82,7 +82,11 @@ except: strip_dict = dict.fromkeys(range(9)+range(12,20)) def escxml(d): - return escape(d, { '"' : '"' } ) + return escape(d, + {'"' : '"', + '<' : '<', + '>' : '>', + }) #------------------------------------------------------------------------- # @@ -376,7 +380,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):