Skip to content

Commit aa31ff8

Browse files
committed
#13296: Category name with special characters brakes in url rewrites category tree
- Load Category Tree in url rewrite page when there is special characters - Change assertion value as per recent code changes - Reformat JS code.
1 parent 46feb0b commit aa31ff8

File tree

2 files changed

+4
-2
lines changed
  • app/code/Magento/Catalog/view/adminhtml/web/js
  • dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Category

2 files changed

+4
-2
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ define([
1010
], function ($) {
1111
'use strict';
1212

13-
var decodeEntities = (function () {
13+
var decodeEntities;
14+
decodeEntities = (function () {
1415
//create a new html document (doesn't execute script tags in child elements)
1516
var doc = document.implementation.createHTMLDocument("");
1617
var element = doc.createElement('div');
@@ -32,6 +33,7 @@ define([
3233
return x;
3334
}
3435
}
36+
3537
return decodeHTMLEntities;
3638
})();
3739

dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Category/TreeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testGetTreeArrayApostropheReplaced()
5656
$tree = $this->_treeBlock->getTreeArray();
5757

5858
$this->assertNotContains('\'', $tree['children'][0]['children'][0]['children'][0]['name']);
59-
$this->assertEquals(''Category 6'', $tree['children'][0]['children'][0]['children'][0]['name']);
59+
$this->assertEquals(''Category 6&#039', $tree['children'][0]['children'][0]['children'][0]['name']);
6060
}
6161

6262
/**

0 commit comments

Comments
 (0)