Simplify htmlescape

This commit is contained in:
Dennis Eichhorn 2017-09-14 20:39:58 +02:00
parent 3a8e53ce1a
commit 367e47aa49
2 changed files with 5 additions and 5 deletions

View File

@ -7,12 +7,12 @@
<input type="radio" id="c-tab-1" name="tabular-1" checked>
<div class="tab">
<textarea style="height: 300px" placeholder="&#xf040;" name="plain" form="docForm"><?= htmlspecialchars(isset($doc) ? $doc->getPlain() : '', ENT_COMPAT, 'utf-8'); ?></textarea><input type="hidden" id="iParsed" name="parsed">
<textarea style="height: 300px" placeholder="&#xf040;" name="plain" form="docForm"><?= $this->printHtml(isset($doc) ? $doc->getPlain() : ''); ?></textarea><input type="hidden" id="iParsed" name="parsed">
</div>
<input type="radio" id="c-tab-2" name="tabular-1">
<div class="tab">
<?= htmlspecialchars(isset($doc) ? $doc->getContent() : '', ENT_COMPAT, 'utf-8'); ?>
<?= $this->printHtml(isset($doc) ? $doc->getContent() : ''); ?>
</div>
</div>
</div>

View File

@ -40,9 +40,9 @@ echo $this->getData('nav')->render(); ?>
<?php $count = 0; foreach($docs as $key => $value) : $count++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/editor/single?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getTitle(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getCreatedBy()->getName1(), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= htmlspecialchars($value->getCreatedAt()->format('Y-m-d H:i:s'), ENT_COMPAT, 'utf-8'); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getTitle()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>