gitweb: Call to_utf8() on input string in chop_and_escape_str()

a) To fix the comparison with the chopped string, otherwise we compare bytes with characters, as chop_str() must run to_utf8() for correct operation b) To give the title attribute correct encoding; we need to mark strings as UTF-8 before outpur Signed-off-by: Jürgen Kreileder <jk@blackdown.de> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jürgen Kreileder committed Dec 17, 2011 at 10:22 UTC 168c1e012030c65f2c1bcdd56a6ec77e37e5a743
1 file changed +1
gitweb/gitweb.perl
+1
@@ -1695,6 +1695,7 @@ sub chop_and_escape_str {
1695 my ($str) = @_;
1696
1697 my $chopped = chop_str(@_);
1698 + $str = to_utf8($str);
1699 if ($chopped eq $str) {
1700 return esc_html($chopped);
1701 } else {