From a8dcc212be9f1a9df6c60184da34be4ceff7066c Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Fri, 5 Apr 2019 07:17:51 +0800 Subject: [PATCH 1/1] MDL-65262 core_calendar: change location param type --- calendar/classes/external/event_exporter_base.php | 2 +- calendar/lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/classes/external/event_exporter_base.php b/calendar/classes/external/event_exporter_base.php index d20cfb3d093..3471a554e46 100644 --- a/calendar/classes/external/event_exporter_base.php +++ b/calendar/classes/external/event_exporter_base.php @@ -125,7 +125,7 @@ class event_exporter_base extends exporter { '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 6ef434fb14f..02c2d971392 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -2849,7 +2849,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(); -- 2.43.0