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
|
||||
*/
|
||||
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…
Reference in New Issue