Skip to content

Commit

Permalink
Merge pull request #408 from helloextend/M247-CSP-bugfix_2
Browse files Browse the repository at this point in the history
Patch Release : Update installation.phtml
  • Loading branch information
jm-extend authored Jul 30, 2024
2 parents a2d9edb + c59fa1f commit bc1b2a4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions view/adminhtml/templates/installation.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* @package Warranty
* @copyright Copyright (c) 2021 Extend Inc. (https://www.extend.com/)
*/

use Magento\Framework\View\Helper\SecureHtmlRenderer;
/** @var SecureHtmlRenderer $secureRenderer */

/** @var \Extend\Warranty\Block\Adminhtml\Order\Create\Installation $block */
/** @var \Extend\Warranty\ViewModel\Installation $viewModel */
$viewModel = $block->getData('viewModel');
Expand All @@ -16,8 +20,11 @@ $currentStoreId = $block->getCurrentStore();
<?php if ($viewModel->isExtendEnabled($currentStoreId)): ?>
<?php $jsonConfig = $viewModel->getJsonConfig($currentStoreId); ?>
<?php if ($jsonConfig): ?>
<script>
Extend.config(<?=/* @noEscape */ $viewModel->getJsonConfig($currentStoreId) ?>);
</script>
<?php
$scriptString = <<<EOT
Extend.config({$viewModel->getJsonConfig($currentStoreId)});
EOT;
echo $secureRenderer->renderTag('script', [], $scriptString, false);
?>
<?php endif; ?>
<?php endif; ?>

0 comments on commit bc1b2a4

Please sign in to comment.