Skip to content

Commit 168c1e0

Browse files
jkreiledergitster
authored andcommitted
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 <[email protected]> Acked-by: Jakub Narębski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 406da78 commit 168c1e0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,7 @@ sub chop_and_escape_str {
16951695
my ($str) = @_;
16961696

16971697
my $chopped = chop_str(@_);
1698+
$str = to_utf8($str);
16981699
if ($chopped eq $str) {
16991700
return esc_html($chopped);
17001701
} else {

0 commit comments

Comments
 (0)