mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
PluginOutput: Fix that subsequent escaped newlines are not transformed
fixes #4297
This commit is contained in:
parent
a6e4307886
commit
e01f51ffc7
@ -16,9 +16,9 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $txtPatterns = array(
|
protected static $txtPatterns = array(
|
||||||
'~\\\n~',
|
|
||||||
'~\\\t~',
|
|
||||||
'~\\\n\\\n~',
|
'~\\\n\\\n~',
|
||||||
|
'~\\\t~',
|
||||||
|
'~\\\n~',
|
||||||
'~(\[|\()OK(\]|\))~',
|
'~(\[|\()OK(\]|\))~',
|
||||||
'~(\[|\()WARNING(\]|\))~',
|
'~(\[|\()WARNING(\]|\))~',
|
||||||
'~(\[|\()CRITICAL(\]|\))~',
|
'~(\[|\()CRITICAL(\]|\))~',
|
||||||
@ -52,9 +52,9 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $htmlPatterns = array(
|
protected static $htmlPatterns = array(
|
||||||
'~\\\n~',
|
|
||||||
'~\\\t~',
|
|
||||||
'~\\\n\\\n~',
|
'~\\\n\\\n~',
|
||||||
|
'~\\\t~',
|
||||||
|
'~\\\n~',
|
||||||
'~<table~'
|
'~<table~'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -65,6 +65,14 @@ class PluginOutputTest extends BaseTestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testOutputWithNewlines()
|
||||||
|
{
|
||||||
|
$this->checkOutput(
|
||||||
|
'foo\nbar\n\nraboof',
|
||||||
|
"foo\nbar\nraboof"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function testOutputWithHtmlEntities()
|
public function testOutputWithHtmlEntities()
|
||||||
{
|
{
|
||||||
$this->checkOutput(
|
$this->checkOutput(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user