img: make img_allowed_formats case-insensitive

master
Simon McVittie 2016-05-06 07:32:17 +01:00
parent 125461cab7
commit 47b180e35f
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ sub allowed {
$allowed = ['jpeg', 'png', 'gif', 'svg'] unless defined $allowed && @$allowed;
foreach my $a (@$allowed) {
return 1 if $a eq $format || $a eq 'everything';
return 1 if lc($a) eq $format || lc($a) eq 'everything';
}
return 0;

View File

@ -98,7 +98,7 @@ EOF
);
ok(utime(333333333, 333333333, "t/tmp/in/imgconversions.mdwn"));
ok(! system(@command, '--set-yaml', 'img_allowed_formats=[jpeg, png, svg, pdf]'));
ok(! system(@command, '--set-yaml', 'img_allowed_formats=[JPEG, PNG, svg, pdf]'));
sub size($) {
my $filename = shift;