Skip to contentSkip to conversation

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

PATCH In review Yasushi SHOJI 3 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitweb - Use <description> instead of <content:encoded>.

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.

---

 gitweb.cgi |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

8a489f354a5412e44ddaf7443aaecb47a81167f8

gitweb.cgi +2 -3
@@ -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>";
#2 lore raw

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

Quoted 9 lines · Sven Verdoolaege
Quoted 2 lines · Yasushi SHOJI

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

#3 lore raw
In reply to Yasushi SHOJI
Quoted 4 lines · Yasushi SHOJI

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

#4 lore raw

At Thu, 18 Aug 2005 18:01:09 +0200,

Quoted 10 lines · Kay Sievers
Quoted 4 lines · Yasushi SHOJI

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

Quoted 7 lines

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?

Quoted 1 line

"It works in XY-reader" does not count. :)

agreed.
--
yashi