markuspoerschke / iCal

iCal-creator for PHP
https://ical.poerschke.nrw
MIT License
1.13k stars 162 forks source link

Fix `\n` being escaped to `\\n`, leading to no newlines in actual text #617

Closed tobias-93 closed 4 months ago

tobias-93 commented 5 months ago

If a newline is included in a text field, such as the description, the backslash in \n is first doubled by the parser (so converted to \\n), then the \n is parsed. This results in \\n being included in the final ICS export, which is shown in calendar tools as \n instead of a newline. This PR fixes that, to make sure an intentional \n in the input is also exported as a newline.

markuspoerschke commented 4 months ago

Looks good to me, thanks!