summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürgen Kreileder <jk@blackdown.de>2011-12-17 10:22:21 +0100
committerJunio C Hamano <gitster@pobox.com>2011-12-18 19:44:51 -0800
commit168c1e012030c65f2c1bcdd56a6ec77e37e5a743 (patch)
tree390a69061f238512b9258c627e68859d523fce43
parent406da7803217998ff6bf5dc69c55b1613556c2f4 (diff)
downloadgit-168c1e012030c65f2c1bcdd56a6ec77e37e5a743.tar.gz
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>
-rwxr-xr-xgitweb/gitweb.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4f0c3bd90c..b077032532 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 {