Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Serve ical with CRLF instead LF

Started by Michael 8 years ago · 1 replies · 1254 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, 1 year ago
6 1663 1 year ago
Content & Markdown · by Ton Haarmans, 2 years ago
10 1235 2 years ago
Content & Markdown · by Jan L'Am, 2 years ago
4 1099 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 1002 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1492 2 years ago