diff options
author | Simon McVittie <smcv@debian.org> | 2016-05-06 07:32:17 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2016-05-07 23:22:52 +0100 |
commit | 47b180e35faa67759f0bf7de181a9d6876fd8902 (patch) | |
tree | 6769102fdc33d8ff480ac208e3e8b0ff3ffd57a2 | |
parent | 125461cab730871aef4f07e21ac8cf8c165808ee (diff) | |
download | ikiwiki-47b180e35faa67759f0bf7de181a9d6876fd8902.tar ikiwiki-47b180e35faa67759f0bf7de181a9d6876fd8902.tar.gz |
img: make img_allowed_formats case-insensitive
-rw-r--r-- | IkiWiki/Plugin/img.pm | 2 | ||||
-rwxr-xr-x | t/img.t | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 494fe2335..c3dc41474 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -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; @@ -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; |