Skip to content

Commit 8c7620e

Browse files
authored
Fix HTML tags in meta description
1 parent d18fda2 commit 8c7620e

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)