Bug 38365: Adjust t/mock_templates/opac-tmpl/bootstrap/en/modules/opac-csp.tt

This file now tidies after the patch
"Make tidy.pl compatible with script elements with attributes"

To test:
1. prove t/db_dependent/Koha/Middleware/ContentSecurityPolicy.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Lari Taskula 2026-03-10 12:34:55 +02:00 committed by Jonathan Druart
parent e00059dd1a
commit 046e0f7885
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
2 changed files with 3 additions and 2 deletions

View File

@ -83,7 +83,7 @@ subtest 'test Content-Security-Policy header in a minimal environment' => sub {
"Response contains Content-Security-Policy header with the expected value"
);
is(
$res->content, '<script nonce="' . $test_nonce . '">' . "\n" . '</script>' . "\n",
$res->content, "\n" . ' <script nonce="' . $test_nonce . '">' . "\n" . '</script>' . "\n",
"Response contains generated nonce in the body"
);

View File

@ -1,2 +1,3 @@
[% USE raw %][% USE Koha %]<script nonce="[% Koha.CSPNonce | $raw %]">
[% USE raw %][% USE Koha %]
<script nonce="[% Koha.CSPNonce | $raw %]">
</script>