Skip to content

Commit 2b71053

Browse files
committed
clean code
1 parent 851ddf1 commit 2b71053

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Helper/Data.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ public function ajaxEnabled($storeId = null)
5151
*/
5252
public function getLayerConfiguration($filters)
5353
{
54-
$filterParams = $this->_getRequest()->getParams();
54+
$params = $this->_getRequest()->getParams();
55+
$filterParams = [];
56+
foreach ($params as $key => $param) {
57+
if ($key === 'amp;dimbaar') {
58+
continue;
59+
}
60+
$filterParams[htmlentities($key)] = htmlentities($param);
61+
}
5562

5663
$config = new DataObject([
5764
'active' => array_keys($filterParams),

view/frontend/templates/layer/view.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<script type="text/x-magento-init">
8080
{
8181
".block-content.filter-content":{
82-
"mpAjax": <?= /** @noEscape */ $layerConfig ?>
82+
"mpAjax": <?= /** @noEscape */ $block->escapeJs($layerConfig) ?>
8383
}
8484
}
8585
</script>

0 commit comments

Comments
 (0)