Skip to content

Commit eb8aa49

Browse files
committed
MAGETWO-92931: HTML entities in product name do not display properly in breadcrumb
- escape html, and the frontend will safely render html
1 parent 813219a commit eb8aa49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function getJsonConfiguration() : string
106106
'breadcrumbs' => [
107107
'categoryUrlSuffix' => $this->getCategoryUrlSuffix(),
108108
'userCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(),
109-
'product' => $this->getProductName()
109+
'product' => $this->escaper->escapeHtml($this->getProductName())
110110
]
111111
],
112112
JSON_HEX_TAG

0 commit comments

Comments
 (0)