From 168c1e012030c65f2c1bcdd56a6ec77e37e5a743 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Kreileder?= Date: Sat, 17 Dec 2011 10:22:21 +0100 Subject: [PATCH] gitweb: Call to_utf8() on input string in chop_and_escape_str() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- gitweb/gitweb.perl | 1 + 1 file changed, 1 insertion(+) 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 { -- 2.30.2