File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2025 Adobe
4+ * All Rights Reserved .
55 */
66
77/** @var $block \Magento\Catalog\Block\Product\View */
8+ /** @var $escaper \Magento\Framework\Escaper */
89?>
910
1011<meta property="og:type" content="product" />
1112<meta property="og:title"
12- content="<?= $ block ->escapeHtmlAttr ($ block ->stripTags ($ block ->getProduct ()->getName ())) ?> " />
13+ content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ block ->getProduct ()->getName ())) ?> " />
1314<meta property="og:image"
14- content="<?= $ block ->escapeUrl ($ block ->getImage ($ block ->getProduct (), 'product_base_image ' )->getImageUrl ()) ?> " />
15+ content="<?= $ escaper ->escapeUrl ($ block ->getImage ($ block ->getProduct (), 'product_base_image ' )->getImageUrl ()) ?> " />
1516<meta property="og:description"
16- content="<?= $ block ->escapeHtmlAttr ($ block ->stripTags ($ block ->getProduct ()->getShortDescription ())) ?> " />
17- <meta property="og:url" content="<?= $ block ->escapeUrl ($ block ->getProduct ()->getProductUrl ()) ?> " />
17+ content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ block ->getProduct ()->getShortDescription ())) ?> " />
18+ <meta property="og:url" content="<?= $ escaper ->escapeUrl ($ block ->getProduct ()->getProductUrl ()) ?> " />
1819<?php if ($ block ->getProduct ()->getCanShowPrice () !== false && $ priceAmount = $ block ->getProduct ()
1920 ->getPriceInfo ()
2021 ->getPrice (\Magento \Catalog \Pricing \Price \FinalPrice::PRICE_CODE )
2122 ->getAmount ()):?>
22- <meta property="product:price:amount" content="<?= $ block ->escapeHtmlAttr ($ priceAmount ) ?> "/>
23+ <meta property="product:price:amount" content="<?= $ escaper ->escapeHtmlAttr ($ priceAmount ) ?> "/>
2324 <?= $ block ->getChildHtml ('meta.currency ' ) ?>
2425<?php endif ;?>
You can’t perform that action at this time.
0 commit comments