From e01f51ffc79da1df152cfeef772f94f36f17f999 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 15 Feb 2021 10:22:21 +0100 Subject: [PATCH] PluginOutput: Fix that subsequent escaped newlines are not transformed fixes #4297 --- .../monitoring/application/views/helpers/PluginOutput.php | 8 ++++---- .../php/application/views/helpers/PluginOutputTest.php | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php index 3be9fc7b1..2e0b0b64b 100644 --- a/modules/monitoring/application/views/helpers/PluginOutput.php +++ b/modules/monitoring/application/views/helpers/PluginOutput.php @@ -16,9 +16,9 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract * @var array */ protected static $txtPatterns = array( - '~\\\n~', + '~\\\n\\\n~', '~\\\t~', - '~\\\n\\\n~', + '~\\\n~', '~(\[|\()OK(\]|\))~', '~(\[|\()WARNING(\]|\))~', '~(\[|\()CRITICAL(\]|\))~', @@ -52,9 +52,9 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract * @var array */ protected static $htmlPatterns = array( - '~\\\n~', - '~\\\t~', '~\\\n\\\n~', + '~\\\t~', + '~\\\n~', '~checkOutput( + 'foo\nbar\n\nraboof', + "foo\nbar\nraboof" + ); + } + public function testOutputWithHtmlEntities() { $this->checkOutput(