diff --git a/calendar/event.php b/calendar/event.php index 29b7324b5bd..733fcc2484d 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -125,6 +125,10 @@ $form->name = clean_param(strip_tags($form->name,''), PARAM_CLEAN); + // To avoid double slashes + $form->name = stripslashes($form->name); + $form->description = stripslashes($form->description); + $form->timestart = make_timestamp($form->startyr, $form->startmon, $form->startday, $form->starthr, $form->startmin); if($form->duration == 1) { $form->timeduration = make_timestamp($form->endyr, $form->endmon, $form->endday, $form->endhr, $form->endmin) - $form->timestart; @@ -158,7 +162,7 @@ 'timestart = '.$timestartoffset.','. 'timeduration = '.$form->timeduration.','. 'timemodified = '.time().' WHERE repeatid = '.$event->repeatid); - + /// Log the event update. $form->name = stripslashes($form->name); //To avoid double-slashes add_to_log($form->courseid, 'calendar', 'edit all', 'event.php?action=edit&id='.$form->id, $form->name);