From 30af87dcb7b46f1d3dfd1c9ead236723c8158a97 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 30 Jun 2015 13:15:07 +0200 Subject: [PATCH] Fix new lines when adding an event. --- main/inc/lib/agenda.lib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php index a65c354920..ccf9e8aaae 100644 --- a/main/inc/lib/agenda.lib.php +++ b/main/inc/lib/agenda.lib.php @@ -135,8 +135,9 @@ class Agenda $start = api_get_utc_datetime($start); $end = api_get_utc_datetime($end); $allDay = isset($allDay) && $allDay == 'true' ? 1 : 0; - $id = null; + $content = nl2br($content); + switch ($this->type) { case 'personal': $attributes = array( @@ -1743,6 +1744,10 @@ class Agenda $url = api_get_self().'?action='.$action.'&id='.$id.'&type='.$this->type; } + if (isset($params['content'])) { + $params['content'] = nl2br($params['content']); + } + $form = new FormValidator( 'add_event', 'post',