Add html escaping

This commit is contained in:
Dennis Eichhorn 2017-07-24 20:48:22 +02:00
parent e0aee606c3
commit fd3033d620
3 changed files with 9 additions and 9 deletions

View File

@ -25,22 +25,22 @@ 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('Groups'); ?></caption> <caption><?= $this->getHtml('Groups') ?></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getText('ID', 0, 0); ?> <td><?= $this->getHtml('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?> <td class="wf-100"><?= $this->getHtml('Name') ?>
<tfoot> <tfoot>
<tr><td colspan="2"> <tr><td colspan="2">
<tbody> <tbody>
<?php $c = 0; foreach ($categories as $key => $value) : $c++; <?php $c = 0; foreach ($categories as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>"> <tr data-href="<?= $url; ?>">
<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>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($c === 0) : ?> <?php if($c === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getText('Empty', 0, 0); ?> <tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>

View File

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

View File

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