From ab99d25cb501edcbca147a9ed0650eb09a6a36ac Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 12 Sep 2019 10:50:17 +0200 Subject: [PATCH] PluginOutput: Relax html restrictions --- .../application/views/helpers/PluginOutput.php | 11 ++--------- .../Web/Helper/PluginOutputPurifier.php | 17 ----------------- 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 modules/monitoring/library/Monitoring/Web/Helper/PluginOutputPurifier.php diff --git a/modules/monitoring/application/views/helpers/PluginOutput.php b/modules/monitoring/application/views/helpers/PluginOutput.php index 78eae2aef..de9a77234 100644 --- a/modules/monitoring/application/views/helpers/PluginOutput.php +++ b/modules/monitoring/application/views/helpers/PluginOutput.php @@ -3,20 +3,13 @@ use Icinga\Web\Dom\DomNodeIterator; use Icinga\Web\View; -use Icinga\Module\Monitoring\Web\Helper\PluginOutputPurifier; +use Icinga\Web\Helper\HtmlPurifier; /** * Plugin output renderer */ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract { - /** - * The return value of getPurifier() - * - * @var HTMLPurifier - */ - protected static $purifier; - /** * Patterns to be replaced in plain text plugin output * @@ -107,7 +100,7 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract $output = preg_replace( self::$htmlPatterns, self::$htmlReplacements, - PluginOutputPurifier::process($output) + HtmlPurifier::process($output) ); $isHtml = true; } else { diff --git a/modules/monitoring/library/Monitoring/Web/Helper/PluginOutputPurifier.php b/modules/monitoring/library/Monitoring/Web/Helper/PluginOutputPurifier.php deleted file mode 100644 index 333df2fe8..000000000 --- a/modules/monitoring/library/Monitoring/Web/Helper/PluginOutputPurifier.php +++ /dev/null @@ -1,17 +0,0 @@ -set( - 'HTML.Allowed', - 'p,br,b,a[href|target],i,ul,ol,li,table,tr,th[colspan],td[colspan],div,span,*[class|style]' - ); - } -}