Preserve <br>s in plugin output

refs #3662
This commit is contained in:
Alexander A. Klimov 2019-03-01 14:59:55 +01:00 committed by Johannes Meyer
parent 723a2091a8
commit fff07144c3
2 changed files with 3 additions and 6 deletions

View File

@ -102,7 +102,6 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
if ($command !== null) {
$output = $this->hookRenderer->render($command, $output, ! $raw);
}
$output = preg_replace('~<br[^>]*>~', "\n", $output);
if (preg_match('~<[^>]*["/\'][^>]*>~', $output)) {
// HTML
$output = preg_replace(

View File

@ -92,15 +92,13 @@ class PluginOutputTest extends BaseTestCase
);
/** @noinspection HtmlUnknownAttribute */
$output = array(
'Teststatus',
'<a href="http://localhost/test.php" target="_blank"[^>]*>Info</a>',
'',
'',
'Teststatus ',
'<a href="http://localhost/test.php" target="_blank"[^>]*>Info</a><br><br>',
'<a href="http://localhost/test2.php" target="_blank"[^>]*>Info2</a>'
);
$this->checkHtmlOutput(
join("\n", $input),
join("\n", $output),
join('', $output),
true
);
}