Skip to content

Commit 1257ce6

Browse files
ENGCOM-1530: Fixed js error when product has double quote in its name #15162
- Merge Pull Request #15162 from vovayatsyuk/magento2:fix-js-error-breadcrumb-with-quote - Merged commits: 1. 45cb52c
2 parents de83f82 + 45cb52c commit 1257ce6

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)