diff --git a/gramps2/src/DataViews/_RelationView.py b/gramps2/src/DataViews/_RelationView.py
index d889d58d9..ba3d62069 100644
--- a/gramps2/src/DataViews/_RelationView.py
+++ b/gramps2/src/DataViews/_RelationView.py
@@ -812,17 +812,17 @@ class RelationshipView(PageView.PersonNavView):
birth = ReportUtils.get_birth_or_fallback(self.dbstate.db, child)
if birth and birth.get_type != RelLib.EventType.BIRTH:
- bdate = "%s" % DateHandler.get_date(birth)
+ bdate = "%s" % cgi.escape(DateHandler.get_date(birth))
elif birth:
- bdate = DateHandler.get_date(birth)
+ bdate = cgi.escape(DateHandler.get_date(birth))
else:
bdate = ""
death = ReportUtils.get_death_or_fallback(self.dbstate.db, child)
if death and death.get_type != RelLib.EventType.DEATH:
- ddate = "%s" % DateHandler.get_date(death)
+ ddate = "%s" % cgi.escape(DateHandler.get_date(death))
elif death:
- ddate = DateHandler.get_date(death)
+ ddate = cgi.escape(DateHandler.get_date(death))
else:
ddate = ""