mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
parent
fe9d355e84
commit
dff6c16bf8
@ -51,6 +51,30 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
|
|||||||
'@@@@@@',
|
'@@@@@@',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patterns to be replaced in html plugin output
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected static $htmlPatterns = array(
|
||||||
|
'~\\\n~',
|
||||||
|
'~\\\t~',
|
||||||
|
'~\\\n\\\n~',
|
||||||
|
'~<table~'
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replacements for $htmlPatterns
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected static $htmlReplacements = array(
|
||||||
|
"\n",
|
||||||
|
"\t",
|
||||||
|
"\n",
|
||||||
|
'<table style="font-size: 0.75em"'
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render plugin output
|
* Render plugin output
|
||||||
*
|
*
|
||||||
@ -68,8 +92,8 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
|
|||||||
if (preg_match('~<[^>]*["/\'][^>]*>~', $output)) {
|
if (preg_match('~<[^>]*["/\'][^>]*>~', $output)) {
|
||||||
// HTML
|
// HTML
|
||||||
$output = preg_replace(
|
$output = preg_replace(
|
||||||
'~<table~',
|
self::$htmlPatterns,
|
||||||
'<table style="font-size: 0.75em"',
|
self::$htmlReplacements,
|
||||||
$this->getPurifier()->purify($output)
|
$this->getPurifier()->purify($output)
|
||||||
);
|
);
|
||||||
$isHtml = true;
|
$isHtml = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user