From dff6c16bf8538444bd5ab0afd664315bcf50d471 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 16 Jan 2018 15:37:30 +0100 Subject: [PATCH] PluginOutput: Properly handle whitespace for html output refs #2846 --- .../views/helpers/PluginOutput.php | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php index 5224185bc..063d81c7d 100644 --- a/modules/monitoring/application/views/helpers/PluginOutput.php +++ b/modules/monitoring/application/views/helpers/PluginOutput.php @@ -51,6 +51,30 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract '@@@@@@', ); + /** + * Patterns to be replaced in html plugin output + * + * @var array + */ + protected static $htmlPatterns = array( + '~\\\n~', + '~\\\t~', + '~\\\n\\\n~', + '~]*["/\'][^>]*>~', $output)) { // HTML $output = preg_replace( - '~getPurifier()->purify($output) ); $isHtml = true;