Skip to content

Commit

Permalink
Escape ICS DESCRIPTION
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Dec 11, 2022
1 parent 419b9f2 commit f632ac0
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/Generators/Ics.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function generate(Link $link): string
}

if ($link->description) {
$url[] = 'DESCRIPTION:'.strip_tags($link->description);
$url[] = 'DESCRIPTION:'.$this->escapeString(strip_tags($link->description));
}
if ($link->address) {
$url[] = 'LOCATION:'.$this->escapeString($link->address);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ SUMMARY:Birthday Party +1
DTSTAMP;TZID=UTC:20180201T090000
DTSTART;TZID=UTC:20180201T090000
DTEND;TZID=UTC:20180201T180000
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog.
There will be line breaks on it.
Project link calendar-links


Thank you.

DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog.\nThere will be line breaks on it.\nProject link calendar-links\n\n\nThank you.\n
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SUMMARY:New Year
DTSTAMP;TZID=UTC:20191231T230000
DTSTART;TZID=UTC:20191231T230000
DTEND;TZID=UTC:20200101T010000
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SUMMARY:Birthday
DTSTAMP;TZID=20180201
DTSTART:20180201
DURATION:P5D
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SUMMARY:Birthday
DTSTAMP;TZID=UTC:20180201T090000
DTSTART;TZID=UTC:20180201T090000
DTEND;TZID=UTC:20180201T180000
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SUMMARY:Birthday
DTSTAMP;TZID=20180201
DTSTART:20180201
DURATION:P1D
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SUMMARY:Birthday
DTSTAMP;TZID=UTC:20180201T090000
DTSTART;TZID=UTC:20180201T090000
DTEND;TZID=UTC:20180201T180000
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SUMMARY:Birthday
DTSTAMP;TZID=UTC:20180201T090000
DTSTART;TZID=UTC:20180201T090000
DTEND;TZID=UTC:20180201T180000
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SUMMARY:Birthday
DTSTAMP;TZID=UTC:20180201T090000
DTSTART;TZID=UTC:20180201T090000
DTEND;TZID=UTC:20180201T180000
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
DESCRIPTION:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
END:VCALENDAR

0 comments on commit f632ac0

Please sign in to comment.