Skip to content

Commit c352078

Browse files
author
Stanislav Idolov
authored
ENGCOM-1239: [Forwardport] Fix HTML tags in meta description #14538
2 parents 4f87be6 + 66e858e commit c352078

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
@@ -130,7 +130,7 @@ private function preparePageMetadata(ResultPage $resultPage, $product)
130130
if ($description) {
131131
$pageConfig->setDescription($description);
132132
} else {
133-
$pageConfig->setDescription($this->string->substr($product->getDescription(), 0, 255));
133+
$pageConfig->setDescription($this->string->substr(strip_tags($product->getDescription()), 0, 255));
134134
}
135135

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

0 commit comments

Comments
 (0)