Add html escaping

This commit is contained in:
Dennis Eichhorn 2017-07-24 20:48:22 +02:00
parent 96c08296dc
commit 8c75e06ab8
4 changed files with 36 additions and 36 deletions

View File

@ -21,20 +21,20 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <section class="box wf-100">
<header><h1><?= $this->getText('Event') ?></h1></header> <header><h1><?= $this->getHtml('Event'); ?></h1></header>
<div class="inner"> <div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/reporter/template'); ?>" method="post"> <form action="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/reporter/template'); ?>" method="post">
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iTitle"><?= $this->getText('Type') ?></label> <tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label>
<tr><td colspan="2"><select></select> <tr><td colspan="2"><select></select>
<tr><td colspan="2"><label for="iBudget"><?= $this->getText('Title'); ?></label> <tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Title') ?></label>
<tr><td colspan="2"><input type="text"> <tr><td colspan="2"><input type="text">
<tr><td colspan="2"><label for="iBudget"><?= $this->getText('Description'); ?></label> <tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Description') ?></label>
<tr><td colspan="2"><textarea></textarea> <tr><td colspan="2"><textarea></textarea>
<tr><td><label for="iTitle"><?= $this->getText('Start') ?></label><td><label for="iTitle"><?= $this->getText('End') ?></label> <tr><td><label for="iTitle"><?= $this->getHtml('Start'); ?></label><td><label for="iTitle"><?= $this->getHtml('End'); ?></label>
<tr><td><input type="datetime-local"><td><input type="datetime-local"> <tr><td><input type="datetime-local"><td><input type="datetime-local">
<tr><td colspan="2"><label for="iBudget"><?= $this->getText('Budget'); ?></label> <tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Budget') ?></label>
<tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder=""> <tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder="">
</table> </table>
</form> </form>

View File

@ -24,26 +24,26 @@ 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('Events') ?></caption> <caption><?= $this->getHtml('Events'); ?></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getText('Status'); ?> <td><?= $this->getHtml('Status') ?>
<td><?= $this->getText('Type'); ?> <td><?= $this->getHtml('Type') ?>
<td class="wf-100"><?= $this->getText('Title'); ?> <td class="wf-100"><?= $this->getHtml('Title') ?>
<td><?= $this->getText('Start'); ?> <td><?= $this->getHtml('Start') ?>
<td><?= $this->getText('End'); ?> <td><?= $this->getHtml('End') ?>
<td><?= $this->getText('Location'); ?> <td><?= $this->getHtml('Location') ?>
<td><?= $this->getText('Expenses'); ?> <td><?= $this->getHtml('Expenses') ?>
<td><?= $this->getText('Sales'); ?> <td><?= $this->getHtml('Sales') ?>
<td><?= $this->getText('Budget'); ?> <td><?= $this->getHtml('Budget') ?>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="9"><?= $footerView->render(); ?> <td colspan="9"><?= htmlspecialchars($footerView->render(), ENT_COMPAT, 'utf-8'); ?>
<tbody> <tbody>
<?php $count = 0; foreach([] as $key => $value) : $count++; ?> <?php $count = 0; foreach([] as $key => $value) : $count++; ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($count === 0) : ?> <?php if($count === 0) : ?>
<tr><td colspan="9" class="empty"><?= $this->getText('Empty', 0, 0); ?> <tr><td colspan="9" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>

View File

@ -21,24 +21,24 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <section class="box wf-100">
<header><h1><?= $this->getText('Promotion') ?></h1></header> <header><h1><?= $this->getHtml('Promotion'); ?></h1></header>
<div class="inner"> <div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/reporter/template'); ?>" method="post"> <form action="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/api/reporter/template'); ?>" method="post">
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iTitle"><?= $this->getText('Type') ?></label> <tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label>
<tr><td colspan="2"><select></select> <tr><td colspan="2"><select></select>
<tr><td colspan="2"><label for="iBudget"><?= $this->getText('Title'); ?></label> <tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Title') ?></label>
<tr><td colspan="2"><input type="text"> <tr><td colspan="2"><input type="text">
<tr><td colspan="2"><label for="iBudget"><?= $this->getText('Description'); ?></label> <tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Description') ?></label>
<tr><td colspan="2"><textarea></textarea> <tr><td colspan="2"><textarea></textarea>
<tr><td><label for="iTitle"><?= $this->getText('Start'); ?></label><td><label for="iTitle"><?= $this->getText('End'); ?></label> <tr><td><label for="iTitle"><?= $this->getHtml('Start') ?></label><td><label for="iTitle"><?= $this->getHtml('End') ?></label>
<tr><td><input type="datetime-local"><td><input type="datetime-local"> <tr><td><input type="datetime-local"><td><input type="datetime-local">
<tr><td colspan="2"><label for="iBudget"><?= $this->getText('Budget'); ?></label> <tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Budget') ?></label>
<tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder=""> <tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder="">
<tr><td colspan="2"><label for="iBudget"><?= $this->getText('Limit'); ?></label> <tr><td colspan="2"><label for="iBudget"><?= $this->getHtml('Limit') ?></label>
<tr><td colspan="2"><input type="text"> <tr><td colspan="2"><input type="text">
<tr><td colspan="2"><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>"> <tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>">
</table> </table>
</form> </form>
</div> </div>

View File

@ -24,24 +24,24 @@ 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('Events') ?></caption> <caption><?= $this->getHtml('Events'); ?></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getText('Status'); ?> <td><?= $this->getHtml('Status') ?>
<td class="wf-100"><?= $this->getText('Title'); ?> <td class="wf-100"><?= $this->getHtml('Title') ?>
<td><?= $this->getText('Start'); ?> <td><?= $this->getHtml('Start') ?>
<td><?= $this->getText('End'); ?> <td><?= $this->getHtml('End') ?>
<td><?= $this->getText('Expenses'); ?> <td><?= $this->getHtml('Expenses') ?>
<td><?= $this->getText('Sales'); ?> <td><?= $this->getHtml('Sales') ?>
<td><?= $this->getText('Budget'); ?> <td><?= $this->getHtml('Budget') ?>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="7"><?= $footerView->render(); ?> <td colspan="7"><?= htmlspecialchars($footerView->render(), ENT_COMPAT, 'utf-8'); ?>
<tbody> <tbody>
<?php $count = 0; foreach([] as $key => $value) : $count++; ?> <?php $count = 0; foreach([] as $key => $value) : $count++; ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($count === 0) : ?> <?php if($count === 0) : ?>
<tr><td colspan="7" class="empty"><?= $this->getText('Empty', 0, 0); ?> <tr><td colspan="7" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>