From f2bc3368e74ded9e04ffecb33d51d33100c488b2 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 6 Nov 2015 01:56:17 +0100 Subject: [PATCH] pluginOutput: make use of new styles --- .../application/views/helpers/PluginOutput.php | 13 ++++++++++--- .../views/scripts/show/components/output.phtml | 8 +++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php index 02b457b49..da33a5efd 100644 --- a/modules/monitoring/application/views/helpers/PluginOutput.php +++ b/modules/monitoring/application/views/helpers/PluginOutput.php @@ -40,6 +40,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract 'getPurifier()->purify($output) ); + $isHtml = true; } else { // Plaintext $output = preg_replace( @@ -47,11 +48,17 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract self::$txtReplacements, $this->view->escape($output) ); - } - if (! $raw) { - $output = '
' . $output . '
'; + $isHtml = false; } $output = $this->fixLinks($output); + + if (! $raw) { + if ($isHtml) { + $output = '
' . $output . '
'; + } else { + $output = '
' . $output . '
'; + } + } return $output; } diff --git a/modules/monitoring/application/views/scripts/show/components/output.phtml b/modules/monitoring/application/views/scripts/show/components/output.phtml index 82230beae..e4c0fd0a8 100644 --- a/modules/monitoring/application/views/scripts/show/components/output.phtml +++ b/modules/monitoring/application/views/scripts/show/components/output.phtml @@ -1,5 +1,3 @@ -
-

translate('Plugin Output') ?>

- pluginOutput($object->output) ?> - pluginOutput($object->long_output) ?> -
+

translate('Plugin Output') ?>

+pluginOutput($object->output) ?> +pluginOutput($object->long_output) ?>