Skip to content

Commit 0f994d4

Browse files
committed
Add escaping of template code
1 parent 7e9036c commit 0f994d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • view/frontend/templates/script/component/customer

view/frontend/templates/script/component/customer/logout.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if ($timeout < 1) {
2727
'You have signed out and will go to our homepage in %1 seconds.'
2828
)
2929
) ?>',
30-
redirectUrl: '<?= $block->getUrl() ?>',
30+
redirectUrl: '<?= $escaper->escapeUrl($block->getUrl()) ?>',
3131
timeout: <?= (int)$timeout ?>,
3232
init() {
3333
this.prefetch();
@@ -58,6 +58,6 @@ if ($timeout < 1) {
5858

5959
<script type="speculationrules">
6060
{
61-
"prerender": [{ "source": "list", "urls": ["<?= $block->getUrl() ?>"] }]
61+
"prerender": [{ "source": "list", "urls": ["<?= $escaper->escapeUrl($block->getUrl()) ?>"] }]
6262
}
6363
</script>

0 commit comments

Comments
 (0)