File tree Expand file tree Collapse file tree 2 files changed +23
-15
lines changed
app/code/Magento/Catalog/view/frontend/templates/product Expand file tree Collapse file tree 2 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 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+ loading="lazy"
16+ width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
17+ height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
18+ alt="<?= $ escaper ->escapeHtmlAttr ($ block ->getLabel ()) ?> " />
Original file line number Diff line number Diff line change 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
912<span class="product-image-container"
10- style="width:<?= $ block ->escapeHtmlAttr ($ block ->getWidth ()) ?> px;">
13+ style="width:<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> px;">
1114 <span class="product-image-wrapper"
1215 style="padding-bottom: <?= ($ block ->getRatio () * 100 ) ?> %;">
13- <img class="<?= $ block ->escapeHtmlAttr ($ block ->getClass ()) ?> "
14- <?= $ block ->escapeHtmlAttr ($ block ->getCustomAttributes ()) ?>
15- src="<?= $ block ->escapeUrl ($ block ->getImageUrl ()) ?> "
16- max-width="<?= $ block ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
17- max-height="<?= $ block ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
18- alt="<?= /* @noEscape */ $ block ->stripTags ($ block ->getLabel (), null , true ) ?> "/></span>
16+ <img class="<?= $ escaper ->escapeHtmlAttr ($ block ->getClass ()) ?> "
17+ <?= $ escaper ->escapeHtmlAttr ($ block ->getCustomAttributes ()) ?>
18+ src="<?= $ escaper ->escapeUrl ($ block ->getImageUrl ()) ?> "
19+ loading="lazy"
20+ width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
21+ height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
22+ alt="<?= $ escaper ->escapeHtmlAttr ($ block ->getLabel ()) ?> "/></span>
1923</span>
You can’t perform that action at this time.
0 commit comments