Do not escape certain HTML markup for plugin output
Use specialized escape functions for plugin output that allow certain HTML formatting to be allowed. refs #9036
This commit is contained in:
parent
9d2f0be24c
commit
7bda4ce42b
|
@ -40,11 +40,14 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
|
|||
);
|
||||
} else {
|
||||
// Plaintext
|
||||
$output = '<pre class="pluginoutput">' . preg_replace(
|
||||
$output = preg_replace(
|
||||
self::$txtPatterns,
|
||||
self::$txtReplacements,
|
||||
$this->view->escape($output)
|
||||
) . '</pre>';
|
||||
);
|
||||
}
|
||||
if (! $raw) {
|
||||
$output = '<pre class="pluginoutput">' . $output . '</pre>';
|
||||
}
|
||||
$output = $this->fixLinks($output);
|
||||
return $output;
|
||||
|
|
|
@ -90,7 +90,7 @@ if (count($hosts) === 0) {
|
|||
)
|
||||
) ?>)</span>
|
||||
<?php endif ?>
|
||||
<p class="pluginoutput"><?= $this->escape($this->ellipsis($host->host_output, 10000)) ?></p>
|
||||
<p class="pluginoutput"><?= $this->pluginOutput($this->ellipsis($host->host_output, 10000), true) ?></p>
|
||||
</td>
|
||||
<?php foreach($this->addColumns as $col): ?>
|
||||
<td><?= $this->escape($host->$col) ?></td>
|
||||
|
|
|
@ -48,7 +48,7 @@ if (count($notifications) === 0) {
|
|||
<?= $this->link()->host($notification->host_name, $notification->host_display_name) ?>
|
||||
<?php endif ?>
|
||||
<br>
|
||||
<?= $this->escape($this->ellipsis($notification->notification_output, 10000)) ?>
|
||||
<?= $this->pluginOutput($this->ellipsis($notification->notification_output, 10000), true) ?>
|
||||
<br>
|
||||
<?php if (! $this->contact): ?>
|
||||
<small>
|
||||
|
|
|
@ -82,7 +82,7 @@ if (count($services) === 0) {
|
|||
)
|
||||
) ?><br />
|
||||
<div class="sparkline-box"><?= $this->perfdata($service->service_perfdata, true, 5) ?> </div>
|
||||
<p class="pluginoutput"><?= $this->escape($this->ellipsis($service->service_output, 10000)) ?></p>
|
||||
<p class="pluginoutput"><?= $this->pluginOutput($this->ellipsis($service->service_output, 10000), true) ?></p>
|
||||
</td>
|
||||
<?php foreach($this->addColumns as $col): ?>
|
||||
<td><?= $this->escape($service->$col) ?></td>
|
||||
|
|
Loading…
Reference in New Issue