Skip to content

Commit

Permalink
Merge pull request #158 from cdubz/157-description-ics
Browse files Browse the repository at this point in the history
Add DESCRIPTION to ICS output
  • Loading branch information
lptn committed Dec 11, 2022
2 parents 12ff860 + 90eaa11 commit ef4ddbf
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Generators/Ics.php
Expand Up @@ -50,6 +50,7 @@ public function generate(Link $link): string
}

if ($link->description) {
$url[] = 'DESCRIPTION:'.strip_tags($link->description);
$url[] = 'X-ALT-DESC;FMTTYPE=text/html:'.$this->escapeString($link->description);
}
if ($link->address) {
Expand Down
Expand Up @@ -7,6 +7,14 @@ 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.

X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog.\nThere will be line breaks on it.\nProject link <a href="https://github.com/spatie/calendar-links">calendar-links</a>\n<img src="https://github-ads.s3.eu-central-1.amazonaws.com/calendar-links.jpg?t=1" width="419px" />\n<br>\nThank you.\n
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down
Expand Up @@ -7,6 +7,8 @@ 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
X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down
Expand Up @@ -7,6 +7,8 @@ SUMMARY:Birthday
DTSTAMP;TZID=20180201
DTSTART:20180201
DURATION:P5D
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down
Expand Up @@ -7,6 +7,8 @@ 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
X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down
Expand Up @@ -7,6 +7,8 @@ SUMMARY:Birthday
DTSTAMP;TZID=20180201
DTSTART:20180201
DURATION:P1D
DESCRIPTION:With balloons, clowns and stuff
Bring a dog, bring a frog
X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down
Expand Up @@ -7,6 +7,8 @@ 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
X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down
Expand Up @@ -7,6 +7,8 @@ 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
X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down
Expand Up @@ -7,6 +7,8 @@ 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
X-ALT-DESC;FMTTYPE=text/html:With balloons\, clowns and stuff\nBring a dog\, bring a frog
LOCATION:Party Lane 1A\, 1337 Funtown
END:VEVENT
Expand Down

0 comments on commit ef4ddbf

Please sign in to comment.