Skip to content

Commit 195aa5d

Browse files
committed
Introduced variable escaping on template, for security reasons
1 parent 4ae2510 commit 195aa5d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

views/templates/hook/ps_googleanalytics.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@
3333
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
3434
{/literal}
3535
{if $gaCrossdomainEnabled}
36-
ga('create', '{$gaAccountId}', 'auto', {literal}{'allowLinker': true}{/literal});
36+
ga('create', '{$gaAccountId|escape:'htmlall':'UTF-8'}', 'auto', {literal}{'allowLinker': true}{/literal});
3737
ga('require', 'linker');
3838
ga('linker:autoLink', [
3939
{foreach from=$shops item=shop}
4040
{if $shop.id_shop != $currentShopId}
41-
'{if $use_secure_more}{$shop.domain_ssl}{else}{$shop.domain}{/if}',
41+
'{if $use_secure_more}{$shop.domain_ssl|escape:'htmlall':'UTF-8'}{else}{$shop.domain|escape:'htmlall':'UTF-8'}{/if}',
4242
{/if}
4343
{/foreach}
4444
]);
4545
{else}
46-
ga('create', '{$gaAccountId}', 'auto');
46+
ga('create', '{$gaAccountId|escape:'htmlall':'UTF-8'}', 'auto');
4747
{/if}
4848
{if $userId && !$backOffice}
49-
ga('set', 'userId', '{$userId}');
49+
ga('set', 'userId', '{$userId|escape:'htmlall':'UTF-8'}');
5050
{/if}
5151
{if $backOffice}
5252
ga('set', 'nonInteraction', true);

0 commit comments

Comments
 (0)