mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Merge pull request #3468 from Mikesch-mp/multiline_custom_vars
Render multiline in custom variables correct.
This commit is contained in:
commit
04913f3699
@ -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->escape(
|
return $this->view->nl2br($this->view->escape(
|
||||||
is_string($struct)
|
is_string($struct)
|
||||||
? $struct
|
? $struct
|
||||||
: var_export($struct, true)
|
: var_export($struct, true)
|
||||||
);
|
));
|
||||||
} elseif (is_array($struct)) {
|
} elseif (is_array($struct)) {
|
||||||
return $this->renderArray($struct);
|
return $this->renderArray($struct);
|
||||||
} elseif (is_object($struct)) {
|
} elseif (is_object($struct)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user