From 575e27f31ef694b3cb404c7d862524c19a4b7473 Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Thu, 19 Feb 2015 14:09:11 +0530 Subject: [PATCH] MDL-38485 calendar: Carry over line breaks on imports Thanks to Matthias Schwabe for the patch suggestion --- calendar/lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calendar/lib.php b/calendar/lib.php index 48829142c89..ca520150237 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -2953,11 +2953,12 @@ function calendar_add_icalendar_event($event, $courseid, $subscriptionid, $timez $description = ''; } else { $description = $event->properties['DESCRIPTION'][0]->value; + $description = clean_param($description, PARAM_NOTAGS); $description = str_replace('\n', '
', $description); $description = str_replace('\\', '', $description); $description = preg_replace('/\s+/', ' ', $description); } - $eventrecord->description = clean_param($description, PARAM_NOTAGS); + $eventrecord->description = $description; // Probably a repeating event with RRULE etc. TODO: skip for now. if (empty($event->properties['DTSTART'][0]->value)) {