]> git.decadent.org.uk Git - dak.git/commitdiff
Merge commit 'godog/master' into merge
authorJoerg Jaspert <joerg@debian.org>
Fri, 27 Mar 2009 20:37:26 +0000 (21:37 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 27 Mar 2009 20:37:26 +0000 (21:37 +0100)
* commit 'godog/master':
  add guid element (same as link) to make feed validator happy
  html entity escape for Maintainer/Description/Changes

Signed-off-by: Joerg Jaspert <joerg@debian.org>
tools/queue_rss.py

index 4c1b45866cde3a5832a871c41bd734d81a85fbcf..9fc5f429115dd24f1d95886de8b92e82c57d2a8c 100755 (executable)
@@ -5,6 +5,7 @@
 # Author: Filippo Giunchedi <filippo@debian.org>
 # Version: 0.4
 
+import cgi
 import os
 import os.path
 import cPickle
@@ -110,16 +111,19 @@ def add_rss_item(status, msg, direction):
         return False
 
     description = "<pre>Description: %s\nChanges: %s\n</pre>" % \
-            (utf2ascii(msg['Description']), utf2ascii(msg['Changes']))
+            (utf2ascii(cgi.escape(msg['Description'])), utf2ascii(cgi.escape(msg['Changes'])))
+
+    link = "http://ftp-master.debian.org/new/%s_%s.html" % \
+            (msg['Source'], msg['Version'])
 
     feed.items.insert(0,
         PyRSS2Gen.RSSItem(
             title,
             pubDate = pubdate,
             description = description,
-            author = utf2ascii(msg['Maintainer']),
-            link = "http://ftp-master.debian.org/new/%s_%s.html" % \
-                    (msg['Source'], msg['Version'])
+            author = utf2ascii(cgi.escape(msg['Maintainer'])),
+            link = link,
+            guid = link
         )
     )