Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Serve ical with CRLF instead LF

Started by Michael 8 years ago · 1 replies · 1106 views
8 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, 11 months ago
6 1126 11 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 904 1 year ago
Content & Markdown · by Jan L'Am, 2 years ago
4 796 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 716 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1124 2 years ago