Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Serve ical with CRLF instead LF

Started by Michael 8 years ago · 1 replies · 1167 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, 12 months ago
6 1285 12 months ago
Content & Markdown · by Ton Haarmans, 2 years ago
10 1015 1 year ago
Content & Markdown · by Jan L'Am, 2 years ago
4 890 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 815 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1233 2 years ago