diff --git a/ChangeLog b/ChangeLog index 0481514bf..2989bbb69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2008-01-03 Benny Malengier + * src/GrampsDbUtils/_GrampsDbWriteXML.py: wrong escape of &, bug 1430 + 2008-01-03 Benny Malengier * src/plugins/RelCalc.py: managed window error, bug 1499 diff --git a/src/GrampsDbUtils/_GrampsDbWriteXML.py b/src/GrampsDbUtils/_GrampsDbWriteXML.py index 0a620950a..950a541d2 100644 --- a/src/GrampsDbUtils/_GrampsDbWriteXML.py +++ b/src/GrampsDbUtils/_GrampsDbWriteXML.py @@ -767,6 +767,15 @@ class GrampsDbXmlWriter(UpdateCallback): self.g.write('%s<%s>%s\n' % (' '*indent,tagname,self.fix(value),tagname)) + def write_line_nofix(self,tagname,value,indent=1): + '''Writes a line, but does not escape characters. + Use this instead of write_line is the value is already fixed, + this avoids & becoming &amp; + ''' + if value: + self.g.write('%s<%s>%s\n' % + (' '*indent, tagname, value, tagname)) + def get_iso_date(self,date): if date[2] == 0: y = "????" @@ -1071,8 +1080,8 @@ class GrampsDbXmlWriter(UpdateCallback): ml_empty = main_loc.is_empty() if title == "": - title = self.fix(self.build_place_title(place.get_main_location())) - self.write_line("ptitle",title,index+1) + title = self.build_place_title(place.get_main_location()) + self.write_line_nofix("ptitle",title,index+1) if longitude or lat: self.g.write('%s\n'