summaryrefslogtreecommitdiff
path: root/sublab_project/calendarium
diff options
context:
space:
mode:
Diffstat (limited to 'sublab_project/calendarium')
-rw-r--r--sublab_project/calendarium/tasks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sublab_project/calendarium/tasks.py b/sublab_project/calendarium/tasks.py
index a2639dc..d0ab16d 100644
--- a/sublab_project/calendarium/tasks.py
+++ b/sublab_project/calendarium/tasks.py
@@ -46,7 +46,8 @@ class CalendariumImport(PeriodicTask):
event_info = {}
for fieldinfo in event_fields:
try:
- event_info[fieldinfo[0]] = event[fieldinfo[1]].format()
+ event_info[fieldinfo[0]] = event[fieldinfo[1]].format().encode("utf-8")
+ event_info[fieldinfo[0]] = event_info[fieldinfo[0]].decode("string-escape")
except KeyError:
event_info[fieldinfo[0]] = fieldinfo[2]
start = icalendar.vDatetime.from_ical(event['dtstart'].ical())