Moodle
  1. Moodle
  2. MDL-29440

Outlook/iCal/Lightning/GoogleCalendar show HTML code in calendar exports

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide

      1) Go to http://moodle/calendar/view.php
      2) Click 'New Event'
      3) Add a calendar event for tomorrow with name 'test' and description 'testing 123' - add some html elements to the description (e.g. bold tags around 123)
      4) Click 'iCal' icon to export events as ical

      Now you can try a few things to examine the result - simplest is to open the iCal export in a text editor and examine the description field - it should not have html in it. You could also use a calendar client to do this (e.g. Apple iCal shows the event with the html tags inline)

      Show
      1) Go to http://moodle/calendar/view.php 2) Click 'New Event' 3) Add a calendar event for tomorrow with name 'test' and description 'testing 123' - add some html elements to the description (e.g. bold tags around 123) 4) Click 'iCal' icon to export events as ical Now you can try a few things to examine the result - simplest is to open the iCal export in a text editor and examine the description field - it should not have html in it. You could also use a calendar client to do this (e.g. Apple iCal shows the event with the html tags inline)
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-29440-master
    • Rank:
      18947

      Description

      Outlook, Apple iCal, Thunderbird with Lightning and Google Calendar shows HTML tags in summary/description.
      Maybe RFC2445 doesn't allow HTML here at all.
      So i changed export_execute.php - see Testing Instructions.
      See Screenshot for Outlook2010 before after after patching export_execute.php.

      1. export_execute.php
        9 kB
        Benjamin Wolf
      1. Auswahl_049.png
        37 kB
      2. Auswahl_053.png
        105 kB

        Activity

        Hide
        Michael de Raadt added a comment -

        From what I can tell after looking at the standard, descriptions in an iCal file should be text with newlines and specific characters escaped. There didn't seem to be any mention of formatting beyond lines.

        I tried a calendar with a formatted description in Google calendar and the tags appeared there also. I'm not sure what the behaviour of Apple iCal or Lightning would be.

        Show
        Michael de Raadt added a comment - From what I can tell after looking at the standard, descriptions in an iCal file should be text with newlines and specific characters escaped. There didn't seem to be any mention of formatting beyond lines. I tried a calendar with a formatted description in Google calendar and the tags appeared there also. I'm not sure what the behaviour of Apple iCal or Lightning would be.
        Hide
        Stephan Kaftanski added a comment -

        iCal and thunderbird+lightning shows tags also.
        i think we tested all important calender apps.

        Show
        Stephan Kaftanski added a comment - iCal and thunderbird+lightning shows tags also. i think we tested all important calender apps.
        Hide
        Stephan Kaftanski added a comment -

        Thunderbird Lightning

        Show
        Stephan Kaftanski added a comment - Thunderbird Lightning
        Hide
        Benjamin Wolf added a comment -

        These tags are use for the text formatting in moodle. But the other calendars do not interpret them and simply print them as part of the description.

        These tags can be removed from the export by changing one line in the export function of the calendar(see attached file line commented with //eledia). This removes all tags from the description string.

        Show
        Benjamin Wolf added a comment - These tags are use for the text formatting in moodle. But the other calendars do not interpret them and simply print them as part of the description. These tags can be removed from the export by changing one line in the export function of the calendar(see attached file line commented with //eledia). This removes all tags from the description string.
        Hide
        Dan Poltawski added a comment -

        Thanks for the report and Patch!

        I have modified your change slightly to use clean_param as this is the moodle standard function for this task.

        Show
        Dan Poltawski added a comment - Thanks for the report and Patch! I have modified your change slightly to use clean_param as this is the moodle standard function for this task.
        Hide
        Dan Poltawski added a comment -

        Pushing this for integration as peer reviews having been very forthcoming and its minor i've effetely been a peer reviewer myself..

        Show
        Dan Poltawski added a comment - Pushing this for integration as peer reviews having been very forthcoming and its minor i've effetely been a peer reviewer myself..
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Some hours ago...

        the main moodle.git repository has been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Some hours ago... the main moodle.git repository has been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Dan Poltawski added a comment -

        rebased

        Show
        Dan Poltawski added a comment - rebased
        Hide
        Sam Hemelryk added a comment -

        Thanks guys this has been integrated now

        Show
        Sam Hemelryk added a comment - Thanks guys this has been integrated now
        Hide
        Michael de Raadt added a comment -

        Oops. I added Raj as peer reviewer instead of tester. Sorry.

        Show
        Michael de Raadt added a comment - Oops. I added Raj as peer reviewer instead of tester. Sorry.
        Hide
        Adrian Greeve added a comment -

        I tried this out in versions 2.2, 2.1 and master. I used a text editor to view the files and I observed that there was no html included in the description (I checked it out pre-patch as well).
        Thanks.

        Show
        Adrian Greeve added a comment - I tried this out in versions 2.2, 2.1 and master. I used a text editor to view the files and I observed that there was no html included in the description (I checked it out pre-patch as well). Thanks.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        FCT (fixed, closing, thanks). Ciao

        "I feel a very unusual sensation - if it is not indigestion, I think it must be gratitude!"
        ~ Benjamin Disraeli

        Show
        Eloy Lafuente (stronk7) added a comment - FCT (fixed, closing, thanks). Ciao "I feel a very unusual sensation - if it is not indigestion, I think it must be gratitude!" ~ Benjamin Disraeli

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: