]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Call to_utf8() on input string in chop_and_escape_str()
authorJürgen Kreileder <redacted>
Sat, 17 Dec 2011 09:22:21 +0000 (10:22 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
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 <redacted>
Acked-by: Jakub Narębski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 0dc7e27b9ebecc4f93666955af4d70b708a01f0ccab37a901fd1166ab5c622c2..33a89d57d8fcd00f4bd701b9f4c0a35d35be337285c0efde22bd71c2f992d54d 100755 (executable)
@@ -1697,6 +1697,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 {
This page took 0.186026 seconds and 4 git commands to generate.