diff --git a/pandora_console/operation/events/events.build_table.php b/pandora_console/operation/events/events.build_table.php index ad35bf6ae2..919de31239 100644 --- a/pandora_console/operation/events/events.build_table.php +++ b/pandora_console/operation/events/events.build_table.php @@ -436,8 +436,11 @@ foreach ($result as $event) { if (in_array('user_comment',$show_fields)) { $safe_event_user_comment = strip_tags(io_safe_output($event["user_comment"])); + $line_breaks = array("\r\n", "\n", "\r"); + $safe_event_user_comment = str_replace($line_breaks, '
', $safe_event_user_comment); $event_user_comments = json_decode($safe_event_user_comment, true); $event_user_comment_str = ""; + if (!empty($event_user_comments)) { $last_key = key(array_slice($event_user_comments, -1, 1, true)); $date_format = $config['date_format'];