Skip to content

Commit 1d62470

Browse files
committed
fixed issue with special characters in product description
1 parent e7accfe commit 1d62470

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Meta/Catalog/Model/Product/Feed/Builder.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,11 @@ protected function getDescription(Product $product)
395395
$productTitle = $this->trimAttribute(self::ATTR_NAME, $title);
396396

397397
$description = $description ?: $productTitle;
398-
// description can't be all uppercase
399-
$description = $this->builderTools->htmlDecode($description);
400-
return html_entity_decode(addslashes($this->builderTools->lowercaseIfAllCaps($description)));
398+
// phpcs:ignore
399+
$description = html_entity_decode($description);
400+
// phpcs:ignore
401+
$description = html_entity_decode(preg_replace( '/<[^<]+?>/', '', $description));
402+
return $this->builderTools->lowercaseIfAllCaps($description);
401403
}
402404

403405
/**

0 commit comments

Comments
 (0)