diff --git a/calendar/classes/external/event_exporter_base.php b/calendar/classes/external/event_exporter_base.php index d20cfb3d09391..3471a554e4683 100644 --- a/calendar/classes/external/event_exporter_base.php +++ b/calendar/classes/external/event_exporter_base.php @@ -125,7 +125,7 @@ protected static function define_properties() { 'null' => NULL_ALLOWED ], 'location' => [ - 'type' => PARAM_RAW_TRIMMED, + 'type' => PARAM_RAW, 'optional' => true, 'default' => null, 'null' => NULL_ALLOWED diff --git a/calendar/lib.php b/calendar/lib.php index 34b0db5ba9737..272805313d106 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -2846,7 +2846,7 @@ function calendar_add_icalendar_event($event, $unused = null, $subscriptionid, $ } $eventrecord->location = empty($event->properties['LOCATION'][0]->value) ? '' : - str_replace('\\', '', $event->properties['LOCATION'][0]->value); + trim(str_replace('\\', '', $event->properties['LOCATION'][0]->value)); $eventrecord->uuid = $event->properties['UID'][0]->value; $eventrecord->timemodified = time();