Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Serve ical with CRLF instead LF

Started by Michael 7 years ago · 1 replies · 857 views
7 years ago

I'm serving a ics file with events using a events.ics.twig file. The file it self is generated, but when I validate the file on https://icalendar.org/validator.html it says that there are missing CRLF. When I download the file on open it in vscode it shows LF although the twig template itself is stored as CRLF. While digging deeper into this topic, it seems that twig always renders LF (https://github.com/twigphp/Twig/issues/1481). Does someone have an idea to solve this issue? I want to serve valid ical files.
Can I write a plugin to replace \n in "twigged" output with \r\n?
Appreciate your help!

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 8 months ago
6 94 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 184 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 146 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 60 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 254 1 year ago