Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29440

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            salvetore 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
            salvetore 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
            kaftanski Stephan Kaftanski added a comment -

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

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

            Thunderbird Lightning

            Show
            kaftanski Stephan Kaftanski added a comment - Thunderbird Lightning
            Hide
            b.wolf82 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
            b.wolf82 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
            poltawski 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
            poltawski 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
            poltawski 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
            poltawski 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
            stronk7 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
            stronk7 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
            poltawski Dan Poltawski added a comment -

            rebased

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

            Thanks guys this has been integrated now

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

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

            Show
            salvetore Michael de Raadt added a comment - Oops. I added Raj as peer reviewer instead of tester. Sorry.
            Hide
            abgreeve 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
            abgreeve 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
            stronk7 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
            stronk7 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:
                  Fix Release Date:
                  14/May/12