saw303 / grails-ic-alender

iCalender Plugin for Grails
http://grails.org/plugin/ic-alendar
Other
8 stars 11 forks source link

commas are rendered in a strange way #22

Closed dietmar-calmbach-mpf closed 6 years ago

dietmar-calmbach-mpf commented 6 years ago

hi kindly developers,

first of all thank you for developing this great plugin.

I have the problem that if in the description or the summary (maybe somewhere else too) of an event is a comma, the output of the comma is rendered as \,

e.g.

def test() {
        renderCalendar {
            calendar {
                events {
                    event(start: Date.parse('dd.MM.yyyy HH:mm', '01.11.2009 14:00'),
                    end: Date.parse('dd.MM.yyyy HH:mm', '01.11.2009 15:00'),
                    description: 'hell, yes',
                    summary: 'Short, info2',
                    location: '@home',
                    classification: 'private'){
                        organizer(name: 'Silvio Wangler', email: 'b.c@d.com')
                    }
                }
            }
        }
    }

is rendered as

BEGIN:VCALENDAR
PRODID:-//Grails iCalendar plugin//NONSGML Grails iCalendar plugin//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTAMP:20180108T110609Z
DTSTART;TZID=Europe/Zurich:20091101T140000
DTEND;TZID=Europe/Zurich:20091101T150000
**SUMMARY:Short\\, info2**
UID:20180108T110609Z-iCalPlugin-Grails@fe80:0:0:0:6cb2:d4ff:fe2a:3be4%awdl0
TZID:Europe/Zurich
LOCATION:@home
**DESCRIPTION:hell\\, yes**
CLASS:PRIVATE
ORGANIZER;CN=Silvio Wangler:mailto:b.c@d.com
METHOD:PUBLISH
END:VEVENT
END:VCALENDAR

Is this a bug or is there a way to get over it?

Kind regards Dietmar

saw303 commented 6 years ago

Hi Dietmar

Thanks for reporting that issue.

What version of the plugin do you use?

To me it looks like that commata are escaped by ical4j using the two backslashes \\,. Can you explain what problem this causes? Is that \\, displayed in an calendar app like Outlook?

dietmar-calmbach-mpf commented 6 years ago

Hi Silvio, i'm using the version 0.6.2 this is the latest i think

BTW the output shows only one Backslash followed by a comma, i used two backslahes because one was escaped by github.

The backslahes are shown in any calendar app like outlook and google, and on commandline output with curl as well.

dietmar-calmbach-mpf commented 6 years ago

i just checked the spec RFC5545, this seems to be a requirement, so you can close this issue.

saw303 commented 6 years ago

Closed according @dietmar-calmbach-mpf