Re: [PATCH] gitweb: Output site name with valid utf8 in OPML
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:52:32
Jürgen Kreileder [off-list ref] writes:
quoted hunk ↗ jump to hunk
Signed-off-by: Juergen Kreileder <redacted> --- gitweb/gitweb.perl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 4f0c3bd..df747c1 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl@@ -7699,11 +7699,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">--
Thanks. That is certainly correct... but it is more than just handling utf8, isn't it. It was also about not escaping XML (think of site name containing eg. '<< foo >>' etc.). So the subject / commit message should be corrected. -- Jakub Narębski