PluginOutput helper: use a regex to detect HTML in plugin output

fixes #10366
This commit is contained in:
Alexander A. Klimov 2016-02-17 11:48:34 +01:00
parent b63d2ad291
commit bd02e5468c
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
return '';
}
$output = preg_replace('~<br[^>]*>~', "\n", $output);
if (strlen($output) > strlen(strip_tags($output))) {
if (preg_match('~<[^>]*["/\'][^>]*>~', $output)) {
// HTML
$output = preg_replace(
'~<table~',