Customvar: Transform only real newlines to `<br>`

fixes #3636
This commit is contained in:
Johannes Meyer 2019-04-16 10:10:46 +02:00
parent 4900040d47
commit 924a580297
1 changed files with 2 additions and 2 deletions

View File

@ -16,11 +16,11 @@ class Zend_View_Helper_Customvar extends Zend_View_Helper_Abstract
public function customvar($struct) public function customvar($struct)
{ {
if (is_scalar($struct)) { if (is_scalar($struct)) {
return $this->view->nl2br($this->view->escape( return nl2br($this->view->escape(
is_string($struct) is_string($struct)
? $struct ? $struct
: var_export($struct, true) : var_export($struct, true)
)); ), false);
} elseif (is_array($struct)) { } elseif (is_array($struct)) {
return $this->renderArray($struct); return $this->renderArray($struct);
} elseif (is_object($struct)) { } elseif (is_object($struct)) {