diff --git a/src/Generators/Ics.php b/src/Generators/Ics.php index 887f0dc..24a37fe 100644 --- a/src/Generators/Ics.php +++ b/src/Generators/Ics.php @@ -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) { diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_description_is_html_code_event_link_with_allday_flag__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_description_is_html_code_event_link_with_allday_flag__1.txt index c6ca7c7..ae551b6 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_description_is_html_code_event_link_with_allday_flag__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_description_is_html_code_event_link_with_allday_flag__1.txt @@ -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 calendar-links\n\n
\nThank you.\n LOCATION:Party Lane 1A\, 1337 Funtown END:VEVENT diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link__1.txt index 6743cc2..598adcd 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link__1.txt @@ -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 diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link_with_allday_flag__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link_with_allday_flag__1.txt index 082e2bd..c73d33d 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link_with_allday_flag__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_multiple_days_event_link_with_allday_flag__1.txt @@ -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 diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_short_event_link__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_short_event_link__1.txt index 6c4d8c5..f678241 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_short_event_link__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_short_event_link__1.txt @@ -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 diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_single_day_allday_event_link__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_single_day_allday_event_link__1.txt index 20878dc..55b1ff4 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_single_day_allday_event_link__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_a_single_day_allday_event_link__1.txt @@ -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 diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_an_ics_link_with_custom_uid__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_an_ics_link_with_custom_uid__1.txt index 387e4a4..7564feb 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_an_ics_link_with_custom_uid__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_can_generate_an_ics_link_with_custom_uid__1.txt @@ -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 diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_dtstamp__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_dtstamp__1.txt index 6c4d8c5..f678241 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_dtstamp__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_dtstamp__1.txt @@ -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 diff --git a/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_id__1.txt b/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_id__1.txt index 6c4d8c5..f678241 100644 --- a/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_id__1.txt +++ b/tests/Generators/__snapshots__/IcsGeneratorTest__it_has_a_product_id__1.txt @@ -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