More RSS cleanup based on the suggestions of http://www.feedvalidator.org
authorArt Cancro <ajc@uncensored.citadel.org>
Thu, 26 May 2011 16:53:40 +0000 (12:53 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 20:54:08 +0000 (20:54 +0000)
webcit/feed_generator.c

index b2dd236d65e4700ba1dd43dd6ffa4e77b49a4364..25af56e716174a3c69243b21b88eeea29b49eeba 100644 (file)
@@ -42,7 +42,7 @@ void feed_rss_one_message(long msgnum) {
 
        wc_printf("<item>");
        wc_printf("<link>%s/readfwd?go=", ChrPtr(site_prefix));
-       escputs(ChrPtr(WC->CurRoom.name));
+       urlescputs(ChrPtr(WC->CurRoom.name));
        wc_printf("?start_reading_at=%ld</link>", msgnum);
 
        while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
@@ -124,6 +124,17 @@ void feed_rss_do_messages(void) {
 }
 
 
+/*
+ * Output the room info file of the current room as a <description> for the channel
+ */
+void feed_rss_do_room_info_as_description(void)
+{
+       wc_printf("<description>");
+       escputs(ChrPtr(WC->CurRoom.name));      /* FIXME use the output of RINF instead */
+       wc_printf("</description>\r\n");
+}
+
+
 /*
  * Entry point for RSS feed generator
  */
@@ -174,6 +185,7 @@ void feed_rss(void) {
        escputs(ChrPtr(site_prefix));
        wc_printf("/</link></image>\r\n");
 
+       feed_rss_do_room_info_as_description();
        feed_rss_do_messages();
 
        wc_printf("</channel>"