Skip to content

Commit 6a8a103

Browse files
Do not escape custom attributes
1 parent 04b376d commit 6a8a103

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?>
88

99
<img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>"
10-
<?= $block->escapeHtml($block->getCustomAttributes()) ?>
10+
<?= /* @noEscape */ $block->getCustomAttributes() ?>
1111
src="<?= $block->escapeUrl($block->getImageUrl()) ?>"
1212
width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>"
1313
height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<span class="product-image-wrapper"
1212
style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;">
1313
<img class="<?= $block->escapeHtmlAttr($block->getClass()) ?>"
14-
<?= $block->escapeHtmlAttr($block->getCustomAttributes()) ?>
14+
<?= /* @noEscape */ $block->getCustomAttributes() ?>
1515
src="<?= $block->escapeUrl($block->getImageUrl()) ?>"
1616
max-width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>"
1717
max-height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>"

0 commit comments

Comments
 (0)