- Issue created by @maskedjellybean
- πΊπΈUnited States maskedjellybean Portland, OR
Attaching patches. Be sure to apply ical-make-description-escaping-optional.patch to eluceo/ical, not drupal/ics_field.
After following the Steps to reproduce, and then applying the patches, you can verify they work by doing this:
- Resave node to trigger regenerating of ICS file.
- Click link to download ICS file.
- Import the ICS file into any calendar app. You should see new lines instead of "\\n".
- πΊπΈUnited States maskedjellybean Portland, OR
Realized that this was not working in Outlook. This new patch fixes that. It does a more generic check for HTML in the description. If there is HTML, it runs html2text and calls
$iCalendarEvent->setDescription($this->getCalendarProperty('description'))
with escaping enabled. If there is no HTML it calls$iCalendarEvent->setDescription($this->getCalendarProperty('description'), FALSE)
with escaping disabled and calls$iCalendarEvent->setDescriptionHTML('')
in order to set it to an empty string. This last piece is what fixes the Outlook compatibility.Also, in order to make this work in Outlook you will need the patch from https://www.drupal.org/project/ics_field/issues/2946641#comment-15523825 β¨ Support date_recur field type. Active , because the module as it stands currently (with no patches applied) is not compatible with Outlook. Somehow I stumbled on a fix for Outlook in that otherwise unrelated patch.