Code

gitweb: esc_html() site name for title in OPML
[git.git] / gitweb / gitweb.perl
index 4f0c3bd90c7f90dad1674f50999da534c33c0261..a9f39d59cdaec0880106cbdd03f4011d034d9de8 100755 (executable)
@@ -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 {
@@ -7699,11 +7700,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">