From 45da390e30133f775630cd127d36316d8927782c Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Fri, 21 Nov 2025 16:14:07 +0100 Subject: [PATCH 1/2] Reworked inline tracking script so CSP doesn't block it on the checkout. --- view/frontend/templates/tracking.phtml | 81 +++++++++++++++----------- 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/view/frontend/templates/tracking.phtml b/view/frontend/templates/tracking.phtml index 8b0fff9..b3a576e 100644 --- a/view/frontend/templates/tracking.phtml +++ b/view/frontend/templates/tracking.phtml @@ -1,15 +1,40 @@ getPublicKey())): $clerkJsUrl = $block->getClerkJSLink(); - ?> - - +scriptStr; +?> + + renderTag('script', [], $scriptString, false) ?> Date: Tue, 2 Dec 2025 10:08:47 +0100 Subject: [PATCH 2/2] Also tweak the inline script in the powerstep_script.phtml file --- .../frontend/templates/powerstep_script.phtml | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/view/frontend/templates/powerstep_script.phtml b/view/frontend/templates/powerstep_script.phtml index 7e54629..e779027 100644 --- a/view/frontend/templates/powerstep_script.phtml +++ b/view/frontend/templates/powerstep_script.phtml @@ -1,8 +1,13 @@ shouldShow()): - ?> - - \ No newline at end of file +scriptStr; + + echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); +}