mirror of
https://github.com/git/git.git
synced 2024-09-25 18:01:04 +02:00
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>
This commit is contained in:
parent
168c1e0120
commit
5d7910569b
@ -7700,11 +7700,12 @@ sub git_opml {
|
|||||||
-charset => 'utf-8',
|
-charset => 'utf-8',
|
||||||
-content_disposition => 'inline; filename="opml.xml"');
|
-content_disposition => 'inline; filename="opml.xml"');
|
||||||
|
|
||||||
|
my $title = esc_html($site_name);
|
||||||
print <<XML;
|
print <<XML;
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<opml version="1.0">
|
<opml version="1.0">
|
||||||
<head>
|
<head>
|
||||||
<title>$site_name OPML Export</title>
|
<title>$title OPML Export</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<outline text="git RSS feeds">
|
<outline text="git RSS feeds">
|
||||||
|
Loading…
Reference in New Issue
Block a user