]> git.decadent.org.uk Git - dak.git/commitdiff
html entity escape for Maintainer/Description/Changes
authorFilippo Giunchedi <filippo@esaurito.net>
Fri, 27 Mar 2009 19:09:43 +0000 (20:09 +0100)
committerFilippo Giunchedi <filippo@esaurito.net>
Fri, 27 Mar 2009 19:09:43 +0000 (20:09 +0100)
tools/queue_rss.py

index ce72d65afd5e4fbaa2bba9d71ad8c7a7687c021b..fb56e189a4d24801e4f40d8b3fd363b35f31ac17 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,14 +111,14 @@ 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'])))
 
     feed.items.insert(0,
         PyRSS2Gen.RSSItem(
             title,
             pubDate = pubdate,
             description = description,
-            author = utf2ascii(msg['Maintainer']),
+            author = utf2ascii(cgi.escape(msg['Maintainer'])),
             link = "http://ftp-master.debian.org/new/%s_%s.html" % \
                     (msg['Source'], msg['Version'])
         )