Add html escaping

This commit is contained in:
Dennis Eichhorn 2017-07-24 20:48:22 +02:00
parent 75d0c4fcb3
commit 3def16e3a9

View File

@ -29,31 +29,31 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box wf-100"> <div class="box wf-100">
<table class="table red"> <table class="table red">
<caption><?= $this->getText('Productions'); ?></caption> <caption><?= $this->getHtml('Productions') ?></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getText('Status'); ?> <td><?= $this->getHtml('Status') ?>
<td><?= $this->getText('ID', 0, 0); ?> <td><?= $this->getHtml('ID', 0, 0); ?>
<td><?= $this->getText('ID', 0, 0); ?> <td><?= $this->getHtml('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Article'); ?> <td class="wf-100"><?= $this->getHtml('Article') ?>
<td><?= $this->getText('Quantity'); ?> <td><?= $this->getHtml('Quantity') ?>
<td><?= $this->getText('Start'); ?> <td><?= $this->getHtml('Start') ?>
<td><?= $this->getText('Due'); ?> <td><?= $this->getHtml('Due') ?>
<td><?= $this->getText('Done'); ?> <td><?= $this->getHtml('Done') ?>
<tfoot> <tfoot>
<tr><td colspan="8"><?= $footerView->render(); ?> <tr><td colspan="8"><?= htmlspecialchars($footerView->render(), ENT_COMPAT, 'utf-8'); ?>
<tbody> <tbody>
<?php $c = 0; foreach ([] as $key => $value) : $c++; <?php $c = 0; foreach ([] as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/business/department/profile?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/business/department/profile?{?}&id=' . $value->getId()); ?>
<tr> <tr>
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a> <td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getId(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a> <td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getName(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a> <td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getParent(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getUnit(); ?></a> <td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getUnit(), ENT_COMPAT, 'utf-8'); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($c === 0) : ?> <?php if($c === 0) : ?>
<tr> <tr>
<td colspan="8" class="empty"><?= $this->getText('Empty', 0, 0); ?> <td colspan="8" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>