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 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2025 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
7
7
/** @var $block \Magento\Catalog\Block\Product\View */
8
+ /** @var $escaper \Magento\Framework\Escaper */
8
9
?>
9
10
10
11
<meta property="og:type" content="product" />
11
12
<meta property="og:title"
12
- content="<?= $ block ->escapeHtmlAttr ($ block ->stripTags ($ block ->getProduct ()->getName ())) ?> " />
13
+ content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ block ->getProduct ()->getName ())) ?> " />
13
14
<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 ()) ?> " />
15
16
<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 ()) ?> " />
18
19
<?php if ($ block ->getProduct ()->getCanShowPrice () !== false && $ priceAmount = $ block ->getProduct ()
19
20
->getPriceInfo ()
20
21
->getPrice (\Magento \Catalog \Pricing \Price \FinalPrice::PRICE_CODE )
21
22
->getAmount ()):?>
22
- <meta property="product:price:amount" content="<?= $ block ->escapeHtmlAttr ($ priceAmount ) ?> "/>
23
+ <meta property="product:price:amount" content="<?= $ escaper ->escapeHtmlAttr ($ priceAmount ) ?> "/>
23
24
<?= $ block ->getChildHtml ('meta.currency ' ) ?>
24
25
<?php endif ;?>
You can’t perform that action at this time.
0 commit comments