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="box wf-100">
<table class="table red">
<caption><?= $this->getText('Groups'); ?></caption>
<caption><?= $this->getHtml('Groups') ?></caption>
<thead>
<tr>
<td><?= $this->getText('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getText('Name'); ?>
<td><?= $this->getHtml('ID', 0, 0); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<tfoot>
<tr><td colspan="2">
<tbody>
<?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; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getId(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getName(), ENT_COMPAT, 'utf-8'); ?></a>
<?php endforeach; ?>
<?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; ?>
</table>
</div>

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()) ?>"><?= $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>
</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><?= $doc->getTitle(); ?></h1></header>
<header><h1><?= htmlspecialchars($doc->getTitle(), ENT_COMPAT, 'utf-8'); ?></h1></header>
<div class="inner">
<article>
<?= $doc->getDoc(); ?>
<?= htmlspecialchars($doc->getDoc(), ENT_COMPAT, 'utf-8'); ?>
</article>
</div>
</section>