Simplify htmlescape

This commit is contained in:
Dennis Eichhorn 2017-09-14 20:39:58 +02:00
parent 06980df831
commit deb163bbf7
3 changed files with 5 additions and 5 deletions

View File

@ -35,8 +35,8 @@ echo $this->getData('nav')->render();
<?php $c = 0; foreach ($categories as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<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; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?>
<?php if($c === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>

View File

@ -7,7 +7,7 @@ echo $this->getData('nav')->render(); ?>
<?php foreach($categories as $category) : ?>
<section class="box wf-100 wiki-list">
<div class="inner">
<a href="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/wiki/category?{?}&id=' . $category->getId()); ?>"><?= htmlspecialchars($category->getName(), ENT_COMPAT, 'utf-8'); ?></a>
<a href="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/wiki/category?{?}&id=' . $category->getId()); ?>"><?= $this->printHtml($category->getName()); ?></a>
</div>
</section>
<?php endforeach; ?>

View File

@ -11,10 +11,10 @@ echo $this->getData('nav')->render();
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<header><h1><?= htmlspecialchars($doc->getTitle(), ENT_COMPAT, 'utf-8'); ?></h1></header>
<header><h1><?= $this->printHtml($doc->getTitle()); ?></h1></header>
<div class="inner">
<article>
<?= htmlspecialchars($doc->getDoc(), ENT_COMPAT, 'utf-8'); ?>
<?= $this->printHtml($doc->getDoc()); ?>
</article>
</div>
</section>