]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Output valid utf8 in git_blame_common('data')
[Gitweb] / gitweb.perl
index 33a89d57d8fcd00f4bd701b9f4c0a35d35be337285c0efde22bd71c2f992d54d..0dbca9d055cf5f67cba476952780d4cd05f0e1d0b96efd080751cd1f1462f179 100755 (executable)
@@ -6245,7 +6245,9 @@ sub git_blame_common {
                        -type=>"text/plain", -charset => "utf-8",
                        -status=> "200 OK");
                local $| = 1; # output autoflush
-               print while <$fd>;
+               while (my $line = <$fd>) {
+                       print to_utf8($line);
+               }
                close $fd
                        or print "ERROR $!\n";
 
@@ -7864,11 +7866,12 @@ sub git_opml {
                -charset => 'utf-8',
                -content_disposition => 'inline; filename="opml.xml"');
 
+       my $title = esc_html($site_name);
        print <<XML;
 <?xml version="1.0" encoding="utf-8"?>
 <opml version="1.0">
 <head>
-  <title>$site_name OPML Export</title>
+  <title>$title OPML Export</title>
 </head>
 <body>
 <outline text="git RSS feeds">
This page took 0.29996 seconds and 4 git commands to generate.