diff --git a/tabellio/icalimport/icalimport.py b/tabellio/icalimport/icalimport.py index 11b4cba..74b2245 100644 --- a/tabellio/icalimport/icalimport.py +++ b/tabellio/icalimport/icalimport.py @@ -88,6 +88,12 @@ class IcalImport(BrowserView): description = vevent.x_alt_desc.value except: pass + if description and type(description) is unicode: + # there's some bug in the transformation chain that will at + # the wrong time convert the   and turn it into an invalid + # utf-8 character, therefore we replace all of them right now, + # as it's safe to do. + description = description.replace(' ', u'\xa0') if description: event.text = RichTextValue(raw=description, mimeType='text/html', outputMimeType='text/x-html-safe')