|
Lines 25-31
use Data::Dumper;
Link Here
|
| 25 |
|
25 |
|
| 26 |
use Koha::Devel::Files; |
26 |
use Koha::Devel::Files; |
| 27 |
|
27 |
|
| 28 |
my $dev_files = Koha::Devel::Files->new; |
28 |
my $dev_files = Koha::Devel::Files->new( { context => 'nonce' } ); |
| 29 |
my @files = $dev_files->ls_tt_files; |
29 |
my @files = $dev_files->ls_tt_files; |
| 30 |
ok( @files > 0, 'We should test something' ); |
30 |
ok( @files > 0, 'We should test something' ); |
| 31 |
|
31 |
|
|
Lines 50-56
sub catch_missing_nonce {
Link Here
|
| 50 |
for my $line (@lines) { |
50 |
for my $line (@lines) { |
| 51 |
$line_number++; |
51 |
$line_number++; |
| 52 |
if ( $line =~ m{<script} && $line !~ m{<script nonce=} && $line !~ m{src="} ) { |
52 |
if ( $line =~ m{<script} && $line !~ m{<script nonce=} && $line !~ m{src="} ) { |
| 53 |
next if $line =~ m{Babeltheque_url_js}; # Exception |
|
|
| 54 |
push @errors, "$line_number: $line"; |
53 |
push @errors, "$line_number: $line"; |
| 55 |
} |
54 |
} |
| 56 |
if ( $line =~ m{<style} && $line !~ m{<style nonce=} ) { |
55 |
if ( $line =~ m{<style} && $line !~ m{<style nonce=} ) { |
| 57 |
- |
|
|