@@ -128,8 +128,8 @@ public function getOrdersTrackingCode()
128
128
'price': '%s',
129
129
'quantity': %s
130
130
}); " ,
131
- $ this ->escapeJs ($ item ->getSku ()),
132
- $ this ->escapeJs ($ item ->getName ()),
131
+ $ this ->escapeJsQuote ($ item ->getSku ()),
132
+ $ this ->escapeJsQuote ($ item ->getName ()),
133
133
$ item ->getPrice (),
134
134
$ item ->getQtyOrdered ()
135
135
);
@@ -144,7 +144,7 @@ public function getOrdersTrackingCode()
144
144
'shipping': '%s'
145
145
}); " ,
146
146
$ order ->getIncrementId (),
147
- $ this ->escapeJs ($ this ->_storeManager ->getStore ()->getFrontendName ()),
147
+ $ this ->escapeJsQuote ($ this ->_storeManager ->getStore ()->getFrontendName ()),
148
148
$ order ->getGrandTotal (),
149
149
$ order ->getTaxAmount (),
150
150
$ order ->getShippingAmount ()
@@ -234,15 +234,15 @@ public function getOrdersTrackingData()
234
234
foreach ($ collection as $ order ) {
235
235
foreach ($ order ->getAllVisibleItems () as $ item ) {
236
236
$ result ['products ' ][] = [
237
- 'id ' => $ this ->escapeJs ($ item ->getSku ()),
238
- 'name ' => $ this ->escapeJs ($ item ->getName ()),
237
+ 'id ' => $ this ->escapeJsQuote ($ item ->getSku ()),
238
+ 'name ' => $ this ->escapeJsQuote ($ item ->getName ()),
239
239
'price ' => $ item ->getPrice (),
240
240
'quantity ' => $ item ->getQtyOrdered (),
241
241
];
242
242
}
243
243
$ result ['orders ' ][] = [
244
244
'id ' => $ order ->getIncrementId (),
245
- 'affiliation ' => $ this ->escapeJs ($ this ->_storeManager ->getStore ()->getFrontendName ()),
245
+ 'affiliation ' => $ this ->escapeJsQuote ($ this ->_storeManager ->getStore ()->getFrontendName ()),
246
246
'revenue ' => $ order ->getGrandTotal (),
247
247
'tax ' => $ order ->getTaxAmount (),
248
248
'shipping ' => $ order ->getShippingAmount (),
0 commit comments