threads / patch / 1570

patchgitweb - Use <description> instead of <content:encoded>.

Subject: [PATCH] gitweb - Use <description> instead of <content:encoded>.

## tl;dr

5 messages between Aug 18, 2005 and Aug 18, 2005. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Yasushi SHOJI· Aug 18, 2005, 14:30 UTC · lore
Use <description> instead of <content:encoded>.

RSS 2.0 Specification doesn't have <content:encoded>. see http://blogs.law.harvard.edu/tech/rss

I've tested this with Mozilla Thunderbird version 1.0.6 (20050802), and seems to be working well.

Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>
---
 gitweb.cgi |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
8a489f354a5412e44ddaf7443aaecb47a81167f8
Show changes to gitweb.cgi +2 −3
diff --git a/gitweb.cgi b/gitweb.cgi
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -1426,8 +1426,7 @@ sub git_rss {
 		      "</title>\n" .
 		      "<pubDate>$cd{'rfc2822'}</pubDate>\n" .
 		      "<link>" . escapeHTML("$my_url?p=$project;a=commit;h=$commit") . "</link>\n" .
-		      "<description>" . escapeHTML($co{'title'}) . "</description>\n" .
-		      "<content:encoded>" .
+		      "<description>" .
 		      "<![CDATA[\n";
 		my $comment = $co{'comment'};
 		foreach my $line (@$comment) {
@@ -1442,7 +1441,7 @@ sub git_rss {
 			print "$file<br/>\n";
 		}
 		print "]]>\n" .
-		      "</content:encoded>\n" .
+		      "</description>\n" .
 		      "</item>\n";
 	}
 	print "</channel></rss>";
Sven Verdoolaege· Aug 18, 2005, 15:36 UTC · re: Yasushi SHOJI · lore

Re: [PATCH] gitweb - Use <description> instead of <content:encoded>.

On Thu, Aug 18, 2005 at 11:30:41PM +0900, Yasushi SHOJI wrote:
> Use <description> instead of <content:encoded>.
> 

Hmm.... in snownews this gets displayed as "Use instead of .". (http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=rss)

Is that a problem with snownews or with gitweb ?
skimo
Yasushi SHOJI· Aug 18, 2005, 16:52 UTC · re: Sven Verdoolaege · lore

Re: [PATCH] gitweb - Use <description> instead of <content:encoded>.

At Thu, 18 Aug 2005 17:36:07 +0200, Sven Verdoolaege wrote:

Show 9 quoted lines
> 
> On Thu, Aug 18, 2005 at 11:30:41PM +0900, Yasushi SHOJI wrote:
> > Use <description> instead of <content:encoded>.
> > 
> 
> Hmm.... in snownews this gets displayed as "Use  instead of .".
> (http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=rss)
> 
> Is that a problem with snownews or with gitweb ?

we are not sure. As Kay said, we need to find out _authoritative_ information for this.

regards,
--
        yashi
Kay Sievers· Aug 18, 2005, 16:01 UTC · re: Yasushi SHOJI · lore

Re: [PATCH] gitweb - Use <description> instead of <content:encoded>.

On Thu, Aug 18, 2005 at 11:30:41PM +0900, Yasushi SHOJI wrote:
> Use <description> instead of <content:encoded>.
> 
> RSS 2.0 Specification doesn't have <content:encoded>.
> see http://blogs.law.harvard.edu/tech/rss
See here:
  http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ
  The <description> element is designed to contain plain text ONLY. When
  the content of your items contains anything other than plain text i.e.
  HTML or XHTML the <content:encoded> element should be used.

Hmm, there was a request to change it to "encoded" and the mentioned page sounded reasonable to me. I will happily change it to the "correct" format, if you provide _authoritative_ information that we can trust. "It works in XY-reader" does not count. :)

Thanks, Kay

Yasushi SHOJI· Aug 18, 2005, 16:26 UTC · re: Kay Sievers · lore

Re: [PATCH] gitweb - Use <description> instead of <content:encoded>.

At Thu, 18 Aug 2005 18:01:09 +0200, Kay Sievers wrote:

Show 17 quoted lines
> 
> On Thu, Aug 18, 2005 at 11:30:41PM +0900, Yasushi SHOJI wrote:
> > Use <description> instead of <content:encoded>.
> > 
> > RSS 2.0 Specification doesn't have <content:encoded>.
> > see http://blogs.law.harvard.edu/tech/rss
> 
> See here:
>   http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ
> 
>   The <description> element is designed to contain plain text ONLY. When
>   the content of your items contains anything other than plain text i.e.
>   HTML or XHTML the <content:encoded> element should be used.
> 
> Hmm, there was a request to change it to "encoded" and the mentioned page
> sounded reasonable to me. I will happily change it to the "correct"
> format, if you provide _authoritative_ information that we can trust.
hmm... I'm not an rss guy.  so not sure for anything.

at least, the link you gave me points to the rss 2.0 spec site I put in the log as "RSS v2.0". that can be seen as "more trust'able"

also, in the rss 2.0 spec site, you can find 2.0 sample under "Sapmple files", which contain _escaped tag_ in <description>.

that's all I can say :<  can any one help?
> "It works in XY-reader" does not count. :)
agreed.
--
         yashi

← back to recent threads