PluginOutput: Relax html restrictions

This commit is contained in:
Johannes Meyer 2019-09-12 10:50:17 +02:00
parent c3603c991d
commit ab99d25cb5
2 changed files with 2 additions and 26 deletions

View File

@ -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 {

View File

@ -1,17 +0,0 @@
<?php
/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
namespace Icinga\Module\Monitoring\Web\Helper;
use Icinga\Web\Helper\HtmlPurifier;
class PluginOutputPurifier extends HtmlPurifier
{
protected function configure($config)
{
$config->set(
'HTML.Allowed',
'p,br,b,a[href|target],i,ul,ol,li,table,tr,th[colspan],td[colspan],div,span,*[class|style]'
);
}
}