Subject: Re: [PATCH 2/4] gitweb: Make feed title valid utf8

From: Jakub Narębski <[email-masked]>
Date: Tue, 09 Apr 2013 17:10:31 +0200

Jürgen Kreileder wrote:

> Properly encode site and project names for RSS and Atom feeds.
> 
> Signed-off-by: Jürgen Kreileder <[email-masked]>
> ---
>  gitweb/gitweb.perl |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 9cfe5b5..09294eb 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -8056,7 +8056,7 @@ sub git_feed {
>  	return if ($cgi->request_method() eq 'HEAD');
>  
>  	# header variables
> -	my $title = "$site_name - $project/$action";
> +	my $title = to_utf8($site_name) . " - " . to_utf8($project) . "/$action";
>  	my $feed_type = 'log';
>  	if (defined $hash) {
>  		$title .= " - '$hash'";
> 

Was this patch triggered by some bug?

Because the above is not necessary, as git_feed() has

	$title = esc_html($title);

a bit later, which does to_utf8() internally.
-- 
Jakub Narębski