From c29d719c5039238c24a75cf0e5573e3f908f2584 Mon Sep 17 00:00:00 2001 From: Federico Vera Date: Wed, 5 Jun 2019 20:21:14 -0300 Subject: [PATCH] Use nl2br filter --- .../Module/Server/Controller/ServerController.php | 4 +--- .../default/module/server/server/view.tpl.html | 12 ++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/psm/Module/Server/Controller/ServerController.php b/src/psm/Module/Server/Controller/ServerController.php index 3a9eed8d..b1a2f5dc 100644 --- a/src/psm/Module/Server/Controller/ServerController.php +++ b/src/psm/Module/Server/Controller/ServerController.php @@ -459,12 +459,10 @@ class ServerController extends AbstractServerController { if (strlen($tpl_data['last_output']) > 255) { $tpl_data['last_output_truncated'] = substr($tpl_data['last_output'], 0, 255) . '...'; - $tpl_data['last_output'] = nl2br($tpl_data['last_output']); } if (strlen($tpl_data['last_error_output']) > 255) { - $tpl_data['last_error_output_truncated'] = nl2br(substr($tpl_data['last_error_output'], 0, 255) . '...'); - $tpl_data['last_error_output'] = nl2br($tpl_data['last_error_output']); + $tpl_data['last_error_output_truncated'] = substr($tpl_data['last_error_output'], 0, 255) . '...'; } return $this->twig->render('module/server/server/view.tpl.html', $tpl_data); diff --git a/src/templates/default/module/server/server/view.tpl.html b/src/templates/default/module/server/server/view.tpl.html index bb253059..1f1cc85d 100644 --- a/src/templates/default/module/server/server/view.tpl.html +++ b/src/templates/default/module/server/server/view.tpl.html @@ -335,7 +335,7 @@