Skip to content

Commit 47b5440

Browse files
committed
escape html to escape html characters
1 parent 33144f9 commit 47b5440

File tree

1 file changed

+2
-1
lines changed
  • app/code/Magento/UrlRewrite/Block/Catalog/Category

1 file changed

+2
-1
lines changed

app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\UrlRewrite\Block\Catalog\Category;
78

89
use Magento\Catalog\Api\CategoryRepositoryInterface;
@@ -162,7 +163,7 @@ protected function _getNodesArray($node)
162163
'children_count' => (int)$node->getChildrenCount(),
163164
'is_active' => (bool)$node->getIsActive(),
164165
// Scrub names for raw js output
165-
'name' => htmlspecialchars($this->escapeHtml($node->getName()), ENT_COMPAT, 'UTF-8'),
166+
'name' => $this->escapeHtmlAttr($node->getName(), false),
166167
'level' => (int)$node->getLevel(),
167168
'product_count' => (int)$node->getProductCount(),
168169
];

0 commit comments

Comments
 (0)