From: 张忠山 Date: Thu, 4 Aug 2011 15:52:55 +0000 (+0800) Subject: gitweb: pass string after encoding in utf-8 to syntax highlighter X-Git-Tag: v1.7.7-rc0~54 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=927cd1fc940f7b588521b388aeb610ab3890399e;p=git.git gitweb: pass string after encoding in utf-8 to syntax highlighter Otherwise the highlight filter would work on a corrupt byte sequence. Signed-off-by: 张忠山 Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index dab89f2eb..48def3841 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -6465,7 +6465,7 @@ sub git_blob { $nr++; $line = untabify($line); printf qq!
%4i %s
\n!, - $nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? $line : esc_html($line, -nbsp=>1); + $nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? to_utf8($line) : esc_html($line, -nbsp=>1); } } close $fd