From: Jakub Narebski Date: Mon, 8 Dec 2008 13:13:21 +0000 (+0100) Subject: gitweb: Fix bug in insert_file() subroutine X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/3ee62532faed86d5658760a6a15c0b67bcd43f5352616f5acd1316a0c5a902fa gitweb: Fix bug in insert_file() subroutine In insert_file() subroutine (which is used to insert HTML fragments as custom header, footer, hometext (for projects list view), and per project README.html (for summary view)) we used: map(to_utf8, <$fd>); This doesn't work, and other form has to be used: map { to_utf8($_) } <$fd>; Now with test for t9600 added, for $GIT_DIR/README.html. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index 8d4d14d..912fdfa 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -2765,7 +2765,7 @@ sub insert_file { my $filename = shift; open my $fd, '<', $filename; - print map(to_utf8, <$fd>); + print map { to_utf8($_) } <$fd>; close $fd; }