Skip to content

Commit 0bd7a87

Browse files
author
Timon de Groot
committed
Fix deprecated method usage
1 parent 182a474 commit 0bd7a87

File tree

1 file changed

+10
-7
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product

1 file changed

+10
-7
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/image.phtml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
* See COPYING.txt for license details.
55
*/
66
?>
7-
<?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?>
7+
<?php
8+
/** @var $block \Magento\Catalog\Block\Product\Image */
9+
/** @var $escaper \Magento\Framework\Escaper */
10+
?>
811

9-
<img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>"
10-
<?= $block->escapeHtml($block->getCustomAttributes()) ?>
11-
src="<?= $block->escapeUrl($block->getImageUrl()) ?>"
12-
width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>"
13-
height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>"
14-
alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>" />
12+
<img class="photo image <?= $escaper->escapeHtmlAttr($block->getClass()) ?>"
13+
<?= $escaper->escapeHtml($block->getCustomAttributes()) ?>
14+
src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>"
15+
width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>"
16+
height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
17+
alt="<?= /* @noEscape */ $block->stripTags($block->getLabel(), null, true) ?>" />

0 commit comments

Comments
 (0)