File tree Expand file tree Collapse file tree 2 files changed +2
-30
lines changed
view/frontend/templates/layer Expand file tree Collapse file tree 2 files changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function getLayerConfiguration($filters)
5757 if ($ key === 'amp;dimbaar ' ) {
5858 continue ;
5959 }
60- $ filterParams [$ this -> escapeJs ( htmlentities ($ key )) ] = $ this -> escapeJs ( htmlentities ($ param) );
60+ $ filterParams [htmlentities ($ key )] = htmlentities ($ param );
6161 }
6262 $ config = new DataObject ([
6363 'active ' => array_keys ($ filterParams ),
@@ -67,32 +67,4 @@ public function getLayerConfiguration($filters)
6767
6868 return self ::jsonEncode ($ config ->getData ());
6969 }
70-
71- /**
72- * from Magento Core
73- *
74- * @param string $string
75- *
76- * @return string|null
77- */
78- public function escapeJs ($ string )
79- {
80- if ($ string === '' || ctype_digit ($ string )) {
81- return $ string ;
82- }
83-
84- return preg_replace_callback (
85- '/[^a-z0-9,\._]/iSu ' ,
86- function ($ matches ) {
87- $ chr = $ matches [0 ];
88- if (strlen ($ chr ) != 1 ) {
89- $ chr = mb_convert_encoding ($ chr , 'UTF-16BE ' , 'UTF-8 ' );
90- $ chr = ($ chr === false ) ? '' : $ chr ;
91- }
92-
93- return sprintf ('\\u%04s ' , strtoupper (bin2hex ($ chr )));
94- },
95- $ string
96- );
97- }
9870}
Original file line number Diff line number Diff line change 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>
You can’t perform that action at this time.
0 commit comments