Skip to content

Commit 36f2604

Browse files
ENGCOM-1172: Fix HTML tags in meta description #14436
- Merge Pull Request #14436 from vseager/magento2:patch-1 - Merged commits: 1. 8c7620e
2 parents d18fda2 + 8c7620e commit 36f2604

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/Block/Product

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Block/Product/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ protected function _prepareLayout()
145145
if ($description) {
146146
$this->pageConfig->setDescription($description);
147147
} else {
148-
$this->pageConfig->setDescription($this->string->substr($product->getDescription(), 0, 255));
148+
$this->pageConfig->setDescription($this->string->substr(strip_tags($product->getDescription()), 0, 255));
149149
}
150150
if ($this->_productHelper->canUseCanonicalTag()) {
151151
$this->pageConfig->addRemotePageAsset(

0 commit comments

Comments
 (0)