From: Jürgen Kreileder Date: Sat, 17 Dec 2011 09:22:21 +0000 (+0100) Subject: gitweb: Call to_utf8() on input string in chop_and_escape_str() X-Git-Tag: v1.7.8.3~1^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=168c1e012030c65f2c1bcdd56a6ec77e37e5a743;p=git.git 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 Acked-by: Jakub Narębski Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 4f0c3bd90..b07703253 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1695,6 +1695,7 @@ sub chop_and_escape_str { my ($str) = @_; my $chopped = chop_str(@_); + $str = to_utf8($str); if ($chopped eq $str) { return esc_html($chopped); } else {