diff --git a/src/event.ts b/src/event.ts index 543fba9d..b058b365 100755 --- a/src/event.ts +++ b/src/event.ts @@ -1816,9 +1816,12 @@ export default class ICalEvent { if (this.data.organizer.email && this.data.organizer.mailto) { g += ';EMAIL=' + escape(this.data.organizer.email, false); } + + g += ':'; if(this.data.organizer.email) { - g += ':mailto:' + escape(this.data.organizer.mailto || this.data.organizer.email, false); + g += 'mailto:' + escape(this.data.organizer.mailto || this.data.organizer.email, false); } + g += '\r\n'; } diff --git a/test/event.ts b/test/event.ts index 82108887..9cae0528 100644 --- a/test/event.ts +++ b/test/event.ts @@ -1432,6 +1432,16 @@ describe('ical-generator Event', function () { sentBy: undefined }); }); + + it('should include a : (PR #610)', function () { + const event = new ICalEvent({ + start: moment(), + summary: 'Example Event', + organizer: { name: 'Some Guy' } + }, new ICalCalendar()); + + assert.ok(event.toString().includes('ORGANIZER;CN="Some Guy":')); + }); }); describe('createAttendee()', function () {