Simplify htmlescape

This commit is contained in:
Dennis Eichhorn 2017-09-14 20:39:58 +02:00
parent 2ac2f334ad
commit 6619796baa
2 changed files with 8 additions and 8 deletions

View File

@ -42,10 +42,10 @@ echo $this->getData('nav')->render(); ?>
<?php $c = 0; foreach ([] as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/checklist/single?{?}&id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getId(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getName(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getParent(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getUnit(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()); ?></a>
<?php endforeach; ?>
<?php if($c === 0) : ?>
<tr>

View File

@ -42,10 +42,10 @@ echo $this->getData('nav')->render(); ?>
<?php $c = 0; foreach ([] as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/checklist/single?{?}&id=' . $value->getId()); ?>
<tr>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getId(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getName(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getParent(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getUnit(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()); ?></a>
<?php endforeach; ?>
<?php if($c === 0) : ?>
<tr>