mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Merge pull request #4317 from Icinga/fix/newlines-in-plugin-output-4297
Fix that subsequent escaped newlines are not transformed in plugin output
This commit is contained in:
commit
712e74b3ce
@ -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~',
|
||||
'~<table~'
|
||||
);
|
||||
|
||||
|
@ -65,6 +65,14 @@ class PluginOutputTest extends BaseTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testOutputWithNewlines()
|
||||
{
|
||||
$this->checkOutput(
|
||||
'foo\nbar\n\nraboof',
|
||||
"foo\nbar\nraboof"
|
||||
);
|
||||
}
|
||||
|
||||
public function testOutputWithHtmlEntities()
|
||||
{
|
||||
$this->checkOutput(
|
||||
|
Loading…
x
Reference in New Issue
Block a user