From: Jakub Narebski Date: Wed, 04 Feb 2009 22:56:31 GMT Subject: Re: [PATCHv2 1/6] gitweb: channel image in rss feed Message-ID: <200902042356.34407.jnareb@gmail.com> In-Reply-To: <1232970616-21167-2-git-send-email-giuseppe.bilotta@gmail.com> I'm sorry for the delay reviewing this series. On Mon, 26 Jan 2009, Giuseppe Bilotta wrote: > Define the channel image for the rss feed when the logo or favicon are > defined, preferring the former to the latter. As suggested in the RSS > 2.0 specifications, the image's title and link as set to the same as the > channel's. I think it is a very good idea. > > Signed-off-by: Giuseppe Bilotta I don't personally use either RSS feeds, or Atom feeds from gitweb, therefore I don't feel like I am able to ack this changes... but I do like them. > --- > gitweb/gitweb.perl | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl > index 931db4f..f8a5d2e 100755 > --- a/gitweb/gitweb.perl > +++ b/gitweb/gitweb.perl > @@ -6075,6 +6075,16 @@ XML > "$alt_url\n" . > "$descr\n" . > "en\n"; > + if (defined $logo || defined $favicon) { > + # prefer the logo to the favicon, since RSS > + # doesn't allow both > + my $img = esc_url($logo || $favicon); > + print "\n" . > + "$img\n" . > + "$title\n" . > + "$alt_url\n" . > + "\n"; > + } A question: how should URL, which is _contents_ of a tag (instead of as _attribute_ value), quoted (escaped)? I don't think it is specified in RSS. I guess that using esc_url() is a safe solution. > } elsif ($format eq 'atom') { > print < > -- > 1.5.6.5 > > -- Jakub Narebski Poland