* src/GrampsDb/_WriteXML.py: Escape XML special chars

svn: r7788
This commit is contained in:
Martin Hawlisch 2006-12-12 12:01:41 +00:00
parent ea86f9870b
commit f2aa3cbd29
2 changed files with 5 additions and 4 deletions

View File

@ -5,6 +5,7 @@
* src/DataViews/_PedigreeView.py: Escape XML special chars
* src/plugins/TestcaseGenerator.py: Create media note object;
Randomize URL
* src/GrampsDb/_WriteXML.py: Escape XML special chars
2006-12-11 Don Allingham <don@gramps-project.org>
* src/Editors/_EditMedia.py: fix menu title (bug#755)

View File

@ -526,7 +526,7 @@ class XmlWriter(UpdateCallback):
return
sp = " "*index
priv_text = conf_priv(personref)
rel_text = ' rel="%s"' % personref.get_relation()
rel_text = ' rel="%s"' % escxml(personref.get_relation())
sreflist = personref.get_source_references()
if (len(sreflist) == 0) and personref.get_note() =="":
@ -697,9 +697,9 @@ class XmlWriter(UpdateCallback):
g = name.get_group_as()
self.g.write('%s<last' % (' '*indent))
if p:
self.g.write(' prefix="%s"' % p)
self.g.write(' prefix="%s"' % escxml(p))
if g:
self.g.write(' group="%s"' % g)
self.g.write(' group="%s"' % escxml(g))
self.g.write('>%s</last>\n' % self.fix(n))
def write_line(self,tagname,value,indent=1):
@ -927,7 +927,7 @@ class XmlWriter(UpdateCallback):
if reporef.call_number == "":
callno_text = ''
else:
callno_text = ' callno="%s"' % reporef.call_number
callno_text = ' callno="%s"' % escxml(reporef.call_number)
mtype = reporef.media_type.xml_str()
if mtype: