Skip to content

Commit

Permalink
Merge pull request #3411 from romainruaud/fix_tracker-cdata
Browse files Browse the repository at this point in the history
Remove CDATA tags in tracker JS.
  • Loading branch information
romainruaud authored Oct 16, 2024
2 parents 21249e8 + ff89427 commit d11f5be
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if ($block->isEnabled()) {
$userConsentScript = $this->escapeJsQuote($block->getUserConsentScript());
$userConsentConfig = $jsonHelper->jsonEncode($block->getUserConsentConfig());

$scriptString = "//<![CDATA[\n";
$scriptString = "\n";
$scriptString .= "try{";
$scriptString .= "smileTracker.setConfig({";
$scriptString .= "beaconUrl:'{$beaconUrl}',";
Expand All @@ -54,7 +54,6 @@ if ($block->isEnabled()) {
$scriptString .= "}";
$scriptString .= "});";
$scriptString .= "}catch(err){;}\n";
$scriptString .= "//]]>\n";

echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
}
Expand Down

0 comments on commit d11f5be

Please sign in to comment.