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: 张忠山 <zzs213@126.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

张忠山 committed Aug 4, 2011 at 23:52 UTC 927cd1fc940f7b588521b388aeb610ab3890399e
1 file changed +1 -1
gitweb/gitweb.perl
+1 -1
@@ -6465,7 +6465,7 @@ sub git_blob {
6465 $nr++;
6466 $line = untabify($line);
6467 printf qq!<div class="pre"><a id="l%i" href="%s#l%i" class="linenr">%4i</a> %s</div>\n!,
6468 - $nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? $line : esc_html($line, -nbsp=>1);
6468 + $nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? to_utf8($line) : esc_html($line, -nbsp=>1);
6469 }
6470 }
6471 close $fd