diff --git a/modules/monitoring/application/views/helpers/Perfdata.php b/modules/monitoring/application/views/helpers/Perfdata.php index 176627882..bb9de66eb 100644 --- a/modules/monitoring/application/views/helpers/Perfdata.php +++ b/modules/monitoring/application/views/helpers/Perfdata.php @@ -1,6 +1,6 @@ '; } else { - $result .= '
' + $result .= '
' . implode(',', array($green, $orange, $red, $gray)) - . '
' + . '
' . htmlspecialchars($name) - . '' + . '' . htmlspecialchars($ps[$name]->getFormattedValue() /* $val*/) //. htmlspecialchars($unit) . ''; @@ -81,7 +81,7 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract $result = $perfdata; } if (! $compact && $result !== '') { - $result = '' . $result . '
'; + $result = '' . $result . '
'; } return $result; diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php index 92dbdec26..1e0677587 100644 --- a/modules/monitoring/application/views/helpers/PluginOutput.php +++ b/modules/monitoring/application/views/helpers/PluginOutput.php @@ -6,14 +6,18 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract public function pluginOutput($output) { + if (empty($output)) { + return ''; + } + $output = preg_replace('~]+>~', "\n", $output); if (preg_match('~<\w+[^>]*>~', $output)) { // HTML - $output = preg_replace('~getPurifier()->purify($output) ); } elseif (preg_match('~\\\n~', $output)) { // Plaintext - $output = '
'
                . preg_replace(
               '~\\\n~', "\n", preg_replace(
@@ -22,14 +26,16 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
                  preg_replace('~\[WARNING\]~', '[WARNING]',
                   preg_replace('~\[CRITICAL\]~', '[CRITICAL]',
                    preg_replace('~\@{6,}~', '@@@@@@',
-                     $this->view->escape(wordwrap($output, 72, ' ', true))
+                     $this->view->escape(wordwrap($output, 80, "\n", true))
                 ))))
               )
             ) . '
'; } else { - $output = preg_replace('~\@{6,}~', '@@@@@@', - $this->view->escape(wordwrap($output, 72, ' ', true)) - ); + $output = '
'
+               . preg_replace('~\@{6,}~', '@@@@@@',
+                $this->view->escape(wordwrap($output, 80, "\n", true))
+            ) . '
'; } $output = $this->fixLinks($output); return $output;