Skip to content

Commit

Permalink
update for CSP
Browse files Browse the repository at this point in the history
(cherry picked from commit 66ae382aa8e03b6910456fdcee090a1aec1de9c7)
  • Loading branch information
dunglv authored and JaJuMa committed Dec 31, 2024
1 parent 9238ad4 commit d4a1d23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion view/base/templates/custom_widget/hyva_inlinecss.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use Jajuma\PotHoneySpam\Block\PowerToys\HyvaInlineCss;
use Magento\Framework\Escaper;
/** @var HyvaInlineCss $block */
/** @var Escaper $escaper */
$powerToysHelper = $this->helper(\Jajuma\PowerToys\Helper\Data::class);
$nonce = $powerToysHelper->getNonce();
?>
<div class="powertoys-widget-title"><?= 'Hyvä InlineCSS' ?></div>
<?php if ($block->isParentEnable()): ?>
Expand Down Expand Up @@ -68,7 +70,7 @@ use Magento\Framework\Escaper;
</a>
</div>
</div>
<script>
<script <?= $nonce ? 'nonce="' . $nonce . '"' : '' ?>>
var sizeInlineCssPot = document.querySelector('#info_size_css_content').innerText;
var inlinecssStatusPot = document.querySelector('#info_inlinecss_status').innerText;
var timeGeneratePot = document.querySelector('#info_time_generate').innerText;
Expand Down

0 comments on commit d4a1d23

Please sign in to comment.