Skip to content

Commit

Permalink
Merge pull request #362 from ndm2/bs5-escape-request-params
Browse files Browse the repository at this point in the history
4.x - Escape request params.
  • Loading branch information
ndm2 authored Feb 23, 2022
2 parents 7270778 + 831d0e2 commit e974cb5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/layout/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/
$this->prepend(
'tb_body_attrs',
' class="' . implode(' ', [$this->request->getParam('controller'), $this->request->getParam('action')]) . '" '
' class="' . implode(' ', [h($this->request->getParam('controller')), h($this->request->getParam('action'))]) . '" '
);
if (!$this->fetch('tb_body_start')) {
$this->start('tb_body_start');
Expand Down
2 changes: 1 addition & 1 deletion templates/layout/examples/cover.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$this->prepend(
'tb_body_attrs',
'class="d-flex h-100 text-center text-white bg-dark ' .
implode(' ', [$this->request->getParam('controller'), $this->request->getParam('action')]) .
implode(' ', [h($this->request->getParam('controller')), h($this->request->getParam('action'))]) .
'" '
);

Expand Down
4 changes: 2 additions & 2 deletions templates/layout/examples/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$this->prepend(
'tb_body_attrs',
' class="' .
implode(' ', [$this->request->getParam('controller'), $this->request->getParam('action')]) .
implode(' ', [h($this->request->getParam('controller')), h($this->request->getParam('action'))]) .
'" '
);
$this->start('tb_body_start');
Expand Down Expand Up @@ -46,7 +46,7 @@ class="navbar-toggler position-absolute d-md-none collapsed" type="button"
<main role="main" class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center
pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2 page-header"><?= $this->request->getParam('controller'); ?></h1>
<h1 class="h2 page-header"><?= h($this->request->getParam('controller')) ?></h1>
</div>
<?php
/**
Expand Down
2 changes: 1 addition & 1 deletion templates/layout/examples/signin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
$this->prepend(
'tb_body_attrs',
' class="text-center ' .
implode(' ', [$this->request->getParam('controller'), $this->request->getParam('action')]) .
implode(' ', [h($this->request->getParam('controller')), h($this->request->getParam('action'))]) .
'" '
);
$this->start('tb_body_start');
Expand Down

0 comments on commit e974cb5

Please sign in to comment.