Skip to content

Commit

Permalink
Do not escape custom attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-aleman committed Feb 21, 2020
1 parent 04b376d commit 6a8a103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<?php /** @var $block \Magento\Catalog\Block\Product\Image */ ?>

<img class="photo image <?= $block->escapeHtmlAttr($block->getClass()) ?>"
<?= $block->escapeHtml($block->getCustomAttributes()) ?>
<?= /* @noEscape */ $block->getCustomAttributes() ?>
src="<?= $block->escapeUrl($block->getImageUrl()) ?>"
width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>"
height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<span class="product-image-wrapper"
style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;">
<img class="<?= $block->escapeHtmlAttr($block->getClass()) ?>"
<?= $block->escapeHtmlAttr($block->getCustomAttributes()) ?>
<?= /* @noEscape */ $block->getCustomAttributes() ?>
src="<?= $block->escapeUrl($block->getImageUrl()) ?>"
max-width="<?= $block->escapeHtmlAttr($block->getWidth()) ?>"
max-height="<?= $block->escapeHtmlAttr($block->getHeight()) ?>"
Expand Down

0 comments on commit 6a8a103

Please sign in to comment.