mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-38485 calendar: Carry over line breaks on imports
Thanks to Matthias Schwabe for the patch suggestion
This commit is contained in:
parent
7357af2b0c
commit
575e27f31e
@ -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', '<br />', $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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user