2006-09-01 Alex Roitman <shura@gramps-project.org>

* src/plugins/StatisticsChart.py: Remove cause.
	* src/GrampsDb/_WriteXML.py (write_object): Escape path of the files;
	(fix): remove control characters.



svn: r7296
This commit is contained in:
Alex Roitman 2006-09-01 22:57:57 +00:00
parent 2db671ad1b
commit f1e55e1df0
3 changed files with 10 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2006-09-01 Alex Roitman <shura@gramps-project.org>
* src/plugins/StatisticsChart.py: Remove cause.
* src/GrampsDb/_WriteXML.py (write_object): Escape path of the files;
(fix): remove control characters.
2006-08-29 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py (remove_person,_do_remove_object):
Properly delete objects;

View File

@ -72,6 +72,9 @@ except:
_xml_version = "1.1.2"
# table for skipping control chars from XML
strip_dict = dict.fromkeys(range(20))
#-------------------------------------------------------------------------
#
#
@ -364,7 +367,7 @@ class XmlWriter(UpdateCallback):
self.g.write(" </name-formats>\n")
def fix(self,line):
l = line.strip()
l = unicode(line).strip().translate(strip_dict)
l = l.replace('&','&amp;')
l = l.replace('>','&gt;')
l = l.replace('<','&lt;')
@ -997,7 +1000,7 @@ class XmlWriter(UpdateCallback):
path = path[1:]
self.g.write('%s<file src="%s" mime="%s"%s/>\n'
% (" "*(index+1),path,mime_type,desc_text))
% (" "*(index+1),self.fix(path),mime_type,desc_text))
self.write_attribute_list(obj.get_attribute_list())
if obj.get_note() != "":
self.write_note("note",obj.get_note_object(),index+1)

View File

@ -109,8 +109,6 @@ class Extract:
self.get_birth, self.get_month),
'data_dmonth': ("Death month", _("Death month"),
self.get_death, self.get_month),
'data_dcause': ("Cause of death", _("Cause of death"),
self.get_death, self.get_cause),
'data_bplace': ("Birth place", _("Birth place"),
self.get_birth, self.get_place),
'data_dplace': ("Death place", _("Death place"),
@ -193,13 +191,6 @@ class Extract:
return [DateHandler.displayer._months[month]]
return [_("Date(s) missing")]
def get_cause(self, event):
"return cause for given event"
cause = event.get_cause()
if cause:
return [cause]
return [_("Cause missing")]
def get_place(self, event):
"return place for given event"
place_handle = event.get_place_handle()