Skip to content

Commit

Permalink
ENGCOM-3698: Fix for making subcategories appear in breadcrumbs #19781
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko authored Jan 13, 2019
2 parents e61567a + a423cc1 commit c4498aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,21 @@ public function productJsonEncodeDataProvider() : array
return [
[
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test ™']]),
'{"breadcrumbs":{"categoryUrlSuffix":"."html","userCategoryPathInUrl":0,"product":"Test \u2122"}}',
'{"breadcrumbs":{"categoryUrlSuffix":"."html","useCategoryPathInUrl":0,"product":"Test \u2122"}}',
],
[
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test "']]),
'{"breadcrumbs":{"categoryUrlSuffix":"."html","userCategoryPathInUrl":0,"product":"Test ""}}',
'{"breadcrumbs":{"categoryUrlSuffix":"."html","useCategoryPathInUrl":0,"product":"Test ""}}',
],
[
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test <b>x</b>']]),
'{"breadcrumbs":{"categoryUrlSuffix":".&quot;html","userCategoryPathInUrl":0,"product":'
'{"breadcrumbs":{"categoryUrlSuffix":".&quot;html","useCategoryPathInUrl":0,"product":'
. '"Test &lt;b&gt;x&lt;\/b&gt;"}}',
],
[
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test \'abc\'']]),
'{"breadcrumbs":'
. '{"categoryUrlSuffix":".&quot;html","userCategoryPathInUrl":0,"product":"Test &#039;abc&#039;"}}'
. '{"categoryUrlSuffix":".&quot;html","useCategoryPathInUrl":0,"product":"Test &#039;abc&#039;"}}'
],
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function getJsonConfigurationHtmlEscaped() : string
[
'breadcrumbs' => [
'categoryUrlSuffix' => $this->escaper->escapeHtml($this->getCategoryUrlSuffix()),
'userCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(),
'useCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(),
'product' => $this->escaper->escapeHtml($this->getProductName())
]
],
Expand Down

0 comments on commit c4498aa

Please sign in to comment.