Skip to content

Commit 8924967

Browse files
committed
Fix special char on datalayer
1 parent 2ff7ae8 commit 8924967

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Config/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<language>en_US</language>
1414
<language>fr_FR</language>
1515
</languages>
16-
<version>3.1.2</version>
16+
<version>3.1.3</version>
1717
<authors>
1818
<author>
1919
<name>Bertrand Tourlonias</name>

Service/GoogleTagService.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function getProductItem(
117117
$item = [
118118
'item_id' => $product->getId(),
119119
'item_name' => $product->getRef(),
120-
'item_brand' => null !== $brand ? $brand->setLocale($lang->getLocale())->getTitle() : ConfigQuery::read('store_name'),
120+
'item_brand' => htmlspecialchars(null !== $brand ? $brand->setLocale($lang->getLocale())->getTitle() : ConfigQuery::read('store_name')),
121121
'affiliation' => ConfigQuery::read('store_name'),
122122
'price' => round($productPrice, 2),
123123
'currency' => $currency->getCode(),
@@ -134,7 +134,7 @@ public function getProductItem(
134134
if ($index === 0) {
135135
$categoryIndex = 'item_category';
136136
}
137-
$item[$categoryIndex] = $categoryTitle;
137+
$item[$categoryIndex] = htmlspecialchars($categoryTitle);
138138
}
139139

140140
if (!$isDefaultPse) {

0 commit comments

Comments
 (0)