img: make img_allowed_formats case-insensitive
parent
125461cab7
commit
47b180e35f
|
@ -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;
|
||||
|
|
2
t/img.t
2
t/img.t
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue