CRM-13645 HTML entities in iCal export

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.2.6, 4.4.0
    • Fix Version/s: Unscheduled
    • Component/s: CiviEvent
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)

      Description

      When you are including specials characters in an event description like : ", ', à, é... they are translate to HTML entities in the iCal.

      For exemple go to:
      http://drupal.demo.civicrm.org/civicrm/event/manage/settings?action=update&reset=1&id=1
      Change the description with some specials characters, why not some french "Un jour à Paris"
      Then check out the description here:
      http://drupal.demo.civicrm.org/civicrm/event/ical?reset=1&list=1
      The description is now: "Un jour &agrave\; Paris"

      And BTW, why is there a \ before the semi-colon?

      Until an official fix, here is mine:
      File : administrator/components/com_civicrm/civicrm/CRM/Event/BAO/Event.php
      After line 795 add:
      $info['description'] = preg_replace('/\\\\;/', ";", $info['description']);
      $info['description'] = html_entity_decode($info['description'], ENT_QUOTES | ENT_HTML401, 'UTF-8');

      I know it is not perfect, but still, it work, except for the double quote, I am still looking for a better solution.

        Attachments

          Activity

          [CRM-13645] HTML entities in iCal export
          Thomas added a comment -

          I just found a better solution!

          File: administrator/components/com_civicrm/civicrm/CRM/Utils/ICalendar.php
          Line 60:
          $text = html_entity_decode($text, ENT_QUOTES | ENT_HTML401, 'UTF-8');

          And BTW I comment the line:
          //$text = str_replace("\"", "DQUOTE", $text);
          Because DQUOTE is not a standard for calendar.

          Donald A. Lobo added a comment -


          same as other ical issue. please check rfc and report back. we'll pull this in

          Thomas added a comment -

          If someone is interested, the RFC section related to this issue is here:http://tools.ietf.org/html/rfc5545#section-3.1

          That is too theoretical for me, I don't understand it!

            People

            • Assignee:
              Unassigned
              Reporter:
              Thomas

              Dates

              • Created:
                Updated: