File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed
Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1+ ## [ 3.5.1]
2+ - Fix XSS security breach over site search term
3+
14## [ 3.5.0]
25- Add product click tracking support
36
Original file line number Diff line number Diff line change @@ -173,15 +173,21 @@ public function fillValues($dataLayer)
173173 */
174174 public function prependDataLayer ($ source , $ prettyPrint = false )
175175 {
176+ $ variables = $ this ->getVariables ();
177+
178+ array_walk_recursive ($ variables , static function (&$ item ) {
179+ $ item = htmlspecialchars ($ item );
180+ });
181+
176182 return sprintf (
177183 '%s%s%s%s ' ,
178184 '<script> ' ,
179185 sprintf (
180186 'window.dataLayer.push(%s); ' ,
181- json_encode (
182- $ this -> getVariables () ,
183- ($ prettyPrint ) ? JSON_PRETTY_PRINT : null
184- )
187+ json_encode (
188+ $ variables ,
189+ ($ prettyPrint ) ? JSON_PRETTY_PRINT : null
190+ )
185191 ),
186192 '</script> ' ,
187193 $ source
Original file line number Diff line number Diff line change 33 <label lang =" de" >Tag Manager</label >
44 <label lang =" en" >Tag Manager</label >
55
6- <version >3.5.0 </version >
6+ <version >3.5.1 </version >
77 <link >http://www.webmatch.de</link >
88 <author >Webmatch GmbH</author >
99 <compatibility minVersion =" 5.6.3" />
1010
11+ <changelog version =" 3.5.1" >
12+ <changes lang =" de" >Behebt XSS Sicherheitslücke über den Suchbegriff auf der Suchseite</changes >
13+ <changes lang =" en" >Fix XSS security breach over site search term</changes >
14+ </changelog >
15+
1116 <changelog version =" 3.5.0" >
1217 <changes lang =" de" >Hinzufügen der Möglichkeit des tracken von Produktklicks</changes >
1318 <changes lang =" en" >Add possibility to track product clicks</changes >
You can’t perform that action at this time.
0 commit comments