Skip to content

Commit 5d79105

Browse files
jkreiledergitster
authored andcommitted
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 <[email protected]> Acked-by: Jakub Narębski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 168c1e0 commit 5d79105

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7700,11 +7700,12 @@ sub git_opml {
77007700
-charset => 'utf-8',
77017701
-content_disposition => 'inline; filename="opml.xml"');
77027702

7703+
my $title = esc_html($site_name);
77037704
print <<XML;
77047705
<?xml version="1.0" encoding="utf-8"?>
77057706
<opml version="1.0">
77067707
<head>
7707-
<title>$site_name OPML Export</title>
7708+
<title>$title OPML Export</title>
77087709
</head>
77097710
<body>
77107711
<outline text="git RSS feeds">

0 commit comments

Comments
 (0)