Skip to content

Commit 1ecfd23

Browse files
author
Stanislav Idolov
authored
ENGCOM-1240: [Forwardport] Fix HTML tags in meta description #14539
2 parents 6bc5f27 + 789744d commit 1ecfd23

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function preparePageMetadata(ResultPage $resultPage, $product)
131131
if ($description) {
132132
$pageConfig->setDescription($description);
133133
} else {
134-
$pageConfig->setDescription($this->string->substr($product->getDescription(), 0, 255));
134+
$pageConfig->setDescription($this->string->substr(strip_tags($product->getDescription()), 0, 255));
135135
}
136136

137137
if ($this->_catalogProduct->canUseCanonicalTag()) {

0 commit comments

Comments
 (0)