Simplify htmlescape

This commit is contained in:
Dennis Eichhorn 2017-09-14 20:39:58 +02:00
parent c06c76d6f7
commit 76b7080f3f
2 changed files with 5 additions and 5 deletions

View File

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

View File

@ -24,7 +24,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<div class="inner">
<form id="drawForm" action="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/draw?{?}&csrf={$CSRF}'); ?>" method="POST">
<input type="text" id="iTitle" name="title" class="wf-100" value="<?= htmlspecialchars($image->getMedia()->getName(), ENT_COMPAT, 'utf-8'); ?>"><input type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>">
<input type="text" id="iTitle" name="title" class="wf-100" value="<?= $this->printHtml($image->getMedia()->getName()); ?>"><input type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>">
</form>
</div>
</section>
@ -73,7 +73,7 @@ echo $this->getData('nav')->render(); ?>
<div class="m-draw">
<section class="box wf-100" style="height: 30%;">
<div class="inner resizable">
<canvas data-src="<?= htmlspecialchars($this->request->getUri()->getBase() . $image->getMedia()->getPath(), ENT_COMPAT, 'utf-8'); ?>" id="canvasImage resizable" name="image" form="drawForm"></canvas>
<canvas data-src="<?= $this->printHtml($this->request->getUri()->getBase() . $image->getMedia()->getPath()); ?>" id="canvasImage resizable" name="image" form="drawForm"></canvas>
</div>
</section>
</div>