diff options
author | Joey Hess <joey@kitenet.net> | 2012-01-15 16:39:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-01-15 16:39:13 -0400 |
commit | 1572c3c376df36ea09e27a1ea437e3a75cdf0f84 (patch) | |
tree | 10841cf0f4dadb83f35ed55df0286dac58f65469 /IkiWiki/Plugin/attachment.pm | |
parent | 1d356fdf8b826ac564d8e04d32785367f53e4556 (diff) | |
download | ikiwiki-1572c3c376df36ea09e27a1ea437e3a75cdf0f84.tar ikiwiki-1572c3c376df36ea09e27a1ea437e3a75cdf0f84.tar.gz |
attachment: Fix utf-8 display bug.
Diffstat (limited to 'IkiWiki/Plugin/attachment.pm')
-rw-r--r-- | IkiWiki/Plugin/attachment.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index fd4096edf..5a180cd5c 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -272,6 +272,7 @@ sub attachments_save { my @attachments; my $dir=attachment_holding_location($form->field('page')); foreach my $filename (glob("$dir/*")) { + $filename=Encode::decode_utf8($filename); next unless -f $filename; my $destdir=$config{srcdir}."/". linkpage(IkiWiki::possibly_foolish_untaint( @@ -345,6 +346,7 @@ sub attachment_list ($) { my $dir=attachment_holding_location($page); my $heldmsg=gettext("this attachment is not yet saved"); foreach my $file (glob("$dir/*")) { + $file=Encode::decode_utf8($file); next unless -f $file; my $base=IkiWiki::basename($file); my $f=$loc.$base; |