mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-01-11 15:48:42 +00:00
Simplify htmlescape
This commit is contained in:
parent
7567a23be8
commit
f254686f74
|
|
@ -9,15 +9,15 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="inner">
|
||||
<div class="row middle-xs">
|
||||
<div class="col-xs-1 scores">
|
||||
<span class="score<?= htmlspecialchars($question->hasAccepted() ? ' done' : '', ENT_COMPAT, 'utf-8'); ?>"><?= htmlspecialchars(count($question->getAnswers()), ENT_COMPAT, 'utf-8'); ?></span>
|
||||
<span class="score<?= $this->printHtml($question->hasAccepted() ? ' done' : ''); ?>"><?= $this->printHtml(count($question->getAnswers())); ?></span>
|
||||
</div>
|
||||
<div class="title col-xs-11">
|
||||
<a href="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/qa/question?{?}&id=' . $question->getId()); ?>"><?= htmlspecialchars($question->getName(), ENT_COMPAT, 'utf-8'); ?></a>
|
||||
<a href="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/qa/question?{?}&id=' . $question->getId()); ?>"><?= $this->printHtml($question->getName()); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<?php $badges = $question->getBadges(); foreach($badges as $badge) : ?>
|
||||
<span class="tag red"><?= htmlspecialchars($badge->getName(), ENT_COMPAT, 'utf-8'); ?></span>
|
||||
<span class="tag red"><?= $this->printHtml($badge->getName()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ echo $this->getData('nav')->render();
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= htmlspecialchars($question->getName(), ENT_COMPAT, 'utf-8'); ?></h1></header>
|
||||
<header><h1><?= $this->printHtml($question->getName()); ?></h1></header>
|
||||
<div class="inner">
|
||||
<?= htmlspecialchars($question->getQuestion(), ENT_COMPAT, 'utf-8'); ?>
|
||||
<?= $this->printHtml($question->getQuestion()); ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
@ -21,7 +21,7 @@ echo $this->getData('nav')->render();
|
|||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<?= htmlspecialchars($answer->getAnswer(), ENT_COMPAT, 'utf-8'); ?><?= htmlspecialchars($answer->getCreatedAt()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?><?= htmlspecialchars($answer->getCreatedBy(), ENT_COMPAT, 'utf-8'); ?><?= htmlspecialchars($answer->getStatus(), ENT_COMPAT, 'utf-8'); ?><?= htmlspecialchars($answer->isAccepted(), ENT_COMPAT, 'utf-8'); ?>
|
||||
<?= $this->printHtml($answer->getAnswer()); ?><?= $this->printHtml($answer->getCreatedAt()->format('Y-m-d')); ?><?= $this->printHtml($answer->getCreatedBy()); ?><?= $this->printHtml($answer->getStatus()); ?><?= $this->printHtml($answer->isAccepted()); ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ echo $this->getData('nav')->render();
|
|||
<?php $c = 0; foreach ($tags 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); ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user