Skip to content

Commit 1e22f3d

Browse files
author
Tu Nguyen
committed
used escaper in block
1 parent 4f49790 commit 1e22f3d

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

app/code/Magento/Customer/view/frontend/templates/account/link/authorization.phtml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/** @var \Magento\Customer\Block\Account\AuthorizationLink $block */
8-
7+
/**
8+
* @var \Magento\Customer\Block\Account\AuthorizationLink $block
9+
* @var \Magento\Framework\Escaper $escaper
10+
*/
911
$dataPostParam = '';
1012
if ($block->isLoggedIn()) {
1113
$dataPostParam = sprintf(" data-post='%s'", $block->getPostParams());
1214
}
1315
?>
14-
<li class="link authorization-link" data-label="<?= $block->escapeHtml(__('or')) ?>">
16+
<li class="link authorization-link" data-label="<?= $escaper->escapeHtml(__('or')) ?>">
1517
<a <?= /* @noEscape */ $block->getLinkAttributes() ?>
16-
<?= /* @noEscape */ $dataPostParam ?>><?= $block->escapeHtml($block->getLabel()) ?></a>
18+
<?= /* @noEscape */ $dataPostParam ?>><?= $escaper->escapeHtml($block->getLabel()) ?></a>
1719
</li>

app/code/Magento/Customer/view/frontend/templates/account/link/my-account.phtml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/** @var \Magento\Customer\Block\Account\Link $block */
8-
7+
/**
8+
* @var \Magento\Customer\Block\Account\Link $block
9+
* @var \Magento\Framework\Escaper $escaper
10+
*/
911
?>
1012
<li class="link my-account-link">
11-
<a <?= /* @noEscape */ $block->getLinkAttributes() ?>><?= $block->escapeHtml($block->getLabel()) ?></a>
13+
<a <?= /* @noEscape */ $block->getLinkAttributes() ?>><?= $escaper->escapeHtml($block->getLabel()) ?></a>
1214
</li>

0 commit comments

Comments
 (0)