Skip to content

Commit 45cb52c

Browse files
committed
Fixed js error when product has double quote in its name
1 parent de83f82 commit 45cb52c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $viewModel = $block->getData('viewModel');
1111
"breadcrumbs": {
1212
"categoryUrlSuffix": "<?= $block->escapeHtml($viewModel->getCategoryUrlSuffix()); ?>",
1313
"useCategoryPathInUrl": <?= (int)$viewModel->isCategoryUsedInProductUrl(); ?>,
14-
"product": "<?= $block->escapeHtml($viewModel->getProductName()); ?>"
14+
"product": "<?= $block->escapeHtml($block->escapeJsQuote($viewModel->getProductName(), '"')); ?>"
1515
}
1616
}'>
1717
</div>

0 commit comments

Comments
 (0)