In the Upcoming Events widget, new lines are shown as "n" instead of becoming br tags.
I'm using Google Calendar's ICS links in my widget and I have hit this particular scenario.
If your calendar app created an event with a location like this:
School
Happy Avenue 201
Lima
It will be exported in an ICS as:
LOCATION:School\nHappy Avenue 201\nLima
It will be shown in the sidebar widget as:
SchoolnHappy Avenue 201nLima
It seems this is because the code uses stripslashes() instead of stripcslashes():
https://github.com/Automattic/jetpack/blob/master/_inc/lib/icalendar-reader.php#L730
I believe the solution would be to change that, and then convert the new lines to br tags, or blank spaces.
This is already fixed. The function used is now stripcslashes(). I did checked that it was a valid issue, changing it briefly to stripslashes() and reproduced the issue, but it's fixed now.
https://github.com/Automattic/jetpack/blob/270014d00c95324436477635a6efe4370df55d3a/_inc/lib/icalendar-reader.php#L756
https://github.com/Automattic/jetpack/blob/270014d00c95324436477635a6efe4370df55d3a/_inc/lib/icalendar-reader.php#L779
Reopening this issue as this issue is still present in the latest version of Jetpack.
https://github.com/Automattic/jetpack/blob/master/_inc/lib/icalendar-reader.php#L730
stripslashes() is still being used for Location and Summary.
I remember reporting this somewhere else, but I cannot locate it now. This was also reported as an issue by a user and I was able to confirm that it is still an issue.
1092925-t
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Most helpful comment
Reopening this issue as this issue is still present in the latest version of Jetpack.
https://github.com/Automattic/jetpack/blob/master/_inc/lib/icalendar-reader.php#L730
stripslashes()is still being used for Location and Summary.