]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.cgi
add broken latin encoding to test file
[Gitweb] / gitweb.cgi
index f483009aa1dd1c3d852ac2b51c65d1d0a5bbe675f1a3369791b244a547f30da8..67345d6e13abf01f7e4e67c46d65a3799de56991ddc21daef3fa00f03c757b5f 100755 (executable)
@@ -14,9 +14,10 @@ use CGI::Util qw(unescape);
 use CGI::Carp qw(fatalsToBrowser);
 use Encode;
 use Fcntl ':mode';
+binmode STDOUT, ':utf8';
 
 my $cgi = new CGI;
-my $version =          "251";
+my $version =          "253";
 my $my_url =           $cgi->url();
 my $my_uri =           $cgi->url(-absolute => 1);
 my $rss_link =         "";
@@ -217,8 +218,8 @@ sub esc_url {
 
 sub esc_html {
        my $str = shift;
-       $str = escapeHTML($str);
        $str = decode("utf8", $str, Encode::FB_DEFAULT);
+       $str = escapeHTML($str);
        return $str;
 }
 
@@ -1810,7 +1811,7 @@ sub git_commit {
                              $cgi->a({-href => esc_url("$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$from_file"), -class => "list"}, esc_html($from_file)) .
                              " with " . (int $similarity) . "% similarity$mode_chng]</span></td>\n" .
                              "<td class=\"link\">" .
-                             $cgi->a({-href => esc_uresc_url("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file")}, "blob");
+                             $cgi->a({-href => esc_url("$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file")}, "blob");
                        if ($to_id ne $from_id) {
                                print " | " . $cgi->a({-href => esc_url("$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$to_file")}, "diff");
                        }
This page took 0.30318 seconds and 4 git commands to generate.