aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürgen Kreileder <jk@blackdown.de>2011-12-17 10:22:22 +0100
committerJunio C Hamano <gitster@pobox.com>2011-12-18 19:44:51 -0800
commit5d7910569b2caeb65354d17b26359cb235026b39 (patch)
treeb146810ec51aac720be60d9e285825cb8da11334
parent168c1e012030c65f2c1bcdd56a6ec77e37e5a743 (diff)
downloadgit-5d7910569b2caeb65354d17b26359cb235026b39.tar.gz
git-5d7910569b2caeb65354d17b26359cb235026b39.tar.xz
gitweb: esc_html() site name for title in OPML
This escapes the site name in OPML (XML uses the same escaping rules as HTML). Also fixes encoding issues because esc_html() uses to_utf8(). Signed-off-by: Jürgen Kreileder <jk@blackdown.de> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b07703253..a9f39d59c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -7700,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">