From e3c7f9c15e23b3cabdbdc540fb5c8ab2ab5c1562 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 22 Jul 2024 15:22:08 +0200 Subject: [PATCH] Bugfix: Render script in secure tag #797 --- .../form/mollie_paymentlink_javascript.phtml | 12 ++++++-- .../create/payment_hold_warning.phtml | 16 ++++++++-- .../system/config/button/apikey.phtml | 25 ++++++++++------ .../system/config/button/compatibility.phtml | 29 ++++++++++++------- 4 files changed, 56 insertions(+), 26 deletions(-) diff --git a/view/adminhtml/templates/form/mollie_paymentlink_javascript.phtml b/view/adminhtml/templates/form/mollie_paymentlink_javascript.phtml index f99f16fa7ed..a2e2a307797 100644 --- a/view/adminhtml/templates/form/mollie_paymentlink_javascript.phtml +++ b/view/adminhtml/templates/form/mollie_paymentlink_javascript.phtml @@ -3,8 +3,12 @@ * Copyright Magmodules.eu. All rights reserved. * See COPYING.txt for license details. */ -?> - +SCRIPT; + +echo $secureRenderer->renderTag('script', [], $scriptString, false); diff --git a/view/adminhtml/templates/order/shipment/create/payment_hold_warning.phtml b/view/adminhtml/templates/order/shipment/create/payment_hold_warning.phtml index 273c7804f62..5018f42fa81 100644 --- a/view/adminhtml/templates/order/shipment/create/payment_hold_warning.phtml +++ b/view/adminhtml/templates/order/shipment/create/payment_hold_warning.phtml @@ -1,14 +1,22 @@ +use Magento\Framework\View\Helper\SecureHtmlRenderer; + +/** @var SecureHtmlRenderer $secureRenderer */ +?>
Please note: You are creating a partial shipment, but it's only possible to capture the payment once. Please double-check you are shipping the correct items.
- +SCRIPT; + +echo $secureRenderer->renderTag('script', [], $scriptString, false); diff --git a/view/adminhtml/templates/system/config/button/apikey.phtml b/view/adminhtml/templates/system/config/button/apikey.phtml index 7a1667f6bba..79b69a60dae 100644 --- a/view/adminhtml/templates/system/config/button/apikey.phtml +++ b/view/adminhtml/templates/system/config/button/apikey.phtml @@ -1,15 +1,19 @@ - -getButtonHtml() ?> +SCRIPT; + +echo $secureRenderer->renderTag('script', [], $scriptString, false); + +echo $block->getButtonHtml(); diff --git a/view/adminhtml/templates/system/config/button/compatibility.phtml b/view/adminhtml/templates/system/config/button/compatibility.phtml index 6d714a1b9dd..9afa0b54d1b 100644 --- a/view/adminhtml/templates/system/config/button/compatibility.phtml +++ b/view/adminhtml/templates/system/config/button/compatibility.phtml @@ -1,24 +1,28 @@ - -getButtonHtml() ?> \ No newline at end of file +SCRIPT; + +echo $secureRenderer->renderTag('script', [], $scriptString, false); + +echo $block->getButtonHtml();