Revert "Do not use htmlspecialchars in view scripts"
This reverts commit 607aa9b203
.
`Perfdata::escape()' does not exist. But `Perfdata::view::escape()' does.
This commit is contained in:
parent
a68ccecb28
commit
9269a0cbd5
|
@ -36,9 +36,9 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
|
|||
}
|
||||
$pieChart->setStyle('margin: 0.2em 0.5em 0.2em 0.5em;');
|
||||
$table[] = '<tr><th>' . $pieChart->render()
|
||||
. $this->escape($perfdata->getLabel())
|
||||
. htmlspecialchars($perfdata->getLabel())
|
||||
. '</th><td> '
|
||||
. $this->escape($this->formatPerfdataValue($perfdata)) .
|
||||
. htmlspecialchars($this->formatPerfdataValue($perfdata)) .
|
||||
' </td></tr>';
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
|
|||
protected function createInlinePie(Perfdata $perfdata)
|
||||
{
|
||||
$pieChart = new InlinePie($this->calculatePieChartData($perfdata), $perfdata->getLabel());
|
||||
$pieChart->setLabel($this->escape($perfdata->getLabel()));
|
||||
$pieChart->setLabel(htmlspecialchars($perfdata->getLabel()));
|
||||
$pieChart->setHideEmptyLabel();
|
||||
|
||||
//$pieChart->setHeight(32)->setWidth(32);
|
||||
|
|
|
@ -26,23 +26,23 @@ $contactHelper = $this->getHelper('ContactFlags');
|
|||
<div><?= sprintf(
|
||||
'%1$s: <a href="mailto:%2$s">%2$s</a>',
|
||||
t('Email'),
|
||||
$this->escape($contact->contact_email)
|
||||
htmlspecialchars($contact->contact_email)
|
||||
) ?></div>
|
||||
<?php if ($contact->contact_pager): ?>
|
||||
<div>
|
||||
<?= t('Pager') ?>:
|
||||
<?= $this->escape($contact->contact_pager) ?>
|
||||
<?= htmlspecialchars($contact->contact_pager) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div style="clear: both;"></div>
|
||||
<div class="notification-periods">
|
||||
<div>
|
||||
<?= t('Service notification period') ?>:
|
||||
<?= $this->escape($contact->contact_notify_service_timeperiod) ?>
|
||||
<?= htmlspecialchars($contact->contact_notify_service_timeperiod) ?>
|
||||
</div>
|
||||
<div>
|
||||
<?= t('Host notification period') ?>:
|
||||
<?= $this->escape($contact->contact_notify_host_timeperiod) ?>
|
||||
<?= htmlspecialchars($contact->contact_notify_host_timeperiod) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,8 +7,8 @@ $contactHelper = $this->getHelper('ContactFlags');
|
|||
<thead>
|
||||
<tr>
|
||||
<th colspan="2" style="text-align: left">
|
||||
<?= $this->escape($contact->contact_name) ?><span style="font-weight: normal;"> (<?=
|
||||
$this->escape($contact->contact_alias)
|
||||
<?= htmlspecialchars($contact->contact_name) ?><span style="font-weight: normal;"> (<?=
|
||||
htmlspecialchars($contact->contact_alias)
|
||||
?>)</span>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -18,30 +18,30 @@ $contactHelper = $this->getHelper('ContactFlags');
|
|||
<td><?= t('Email') ?></td>
|
||||
<td><?php printf(
|
||||
'<a href="mailto:%1$s">%1$s</a>',
|
||||
$this->escape($contact->contact_email)
|
||||
htmlspecialchars($contact->contact_email)
|
||||
); ?></td>
|
||||
</tr>
|
||||
<?php if ($contact->contact_pager): ?>
|
||||
<tr>
|
||||
<td><?= t('Pager') ?></td>
|
||||
<td><?= $this->escape($contact->contact_pager) ?></td>
|
||||
<td><?= htmlspecialchars($contact->contact_pager) ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td><?= t('Flags (service)') ?></td>
|
||||
<td><?= $this->escape($contactHelper->contactFlags($contact, 'service')) ?></td>
|
||||
<td><?= htmlspecialchars($contactHelper->contactFlags($contact, 'service')) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= t('Flags (host)') ?></td>
|
||||
<td><?= $this->escape($contactHelper->contactFlags($contact, 'host')) ?></td>
|
||||
<td><?= htmlspecialchars($contactHelper->contactFlags($contact, 'host')) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= t('Service notification period') ?></td>
|
||||
<td><?= $this->escape($contact->contact_notify_service_timeperiod) ?></td>
|
||||
<td><?= htmlspecialchars($contact->contact_notify_service_timeperiod) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= t('Host notification period') ?></td>
|
||||
<td><?= $this->escape($contact->contact_notify_host_timeperiod) ?></td>
|
||||
<td><?= htmlspecialchars($contact->contact_notify_host_timeperiod) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue