import description in event text, in html
This commit is contained in:
parent
0952ad0ec4
commit
15654ab25f
|
@ -10,6 +10,7 @@ from Products.CMFCore.WorkflowCore import WorkflowException
|
|||
from Products.CMFCore.utils import getToolByName
|
||||
from Products.Five.browser import BrowserView
|
||||
from plone.registry.interfaces import IRegistry
|
||||
from plone.app.textfield.value import RichTextValue
|
||||
|
||||
from tabellio.config.interfaces import ITabellioSettings
|
||||
|
||||
|
@ -57,10 +58,23 @@ class IcalImport(BrowserView):
|
|||
event.title = title
|
||||
event.start = date_start
|
||||
event.end = date_end
|
||||
description = None
|
||||
try:
|
||||
event.description = vevent.description.value
|
||||
description = vevent.description.value
|
||||
except:
|
||||
pass
|
||||
if description:
|
||||
event.text = RichTextValue(raw=description,
|
||||
mimeType='text/plain', outputMimeType='text/x-html-safe')
|
||||
description = None
|
||||
try:
|
||||
description = vevent.x_alt_desc.value
|
||||
except:
|
||||
pass
|
||||
if description:
|
||||
event.text = RichTextValue(raw=description,
|
||||
mimeType='text/html', outputMimeType='text/x-html-safe')
|
||||
|
||||
try:
|
||||
event.location = vevent.location.value
|
||||
except:
|
||||
|
|
Reference in New Issue