remove formatted metadata presented as html by zimbra (#1093)

This commit is contained in:
Frédéric Péters 2011-12-01 18:25:09 +01:00
parent a8797a4ce8
commit f4851e2cb9
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ class IcalImport(BrowserView):
# as it's safe to do.
description = description.replace(' ', u'\xa0')
if description:
if '*~*~*~*~*~*~*~*~*~*' in description: # zimbra lovely marker
description = '<html><body>' + \
description[description.index('*~*~*~*~*~*~*~*~*~*')+29:]
event.text = RichTextValue(raw=description,
mimeType='text/html', outputMimeType='text/x-html-safe')