X-Git-Url: https://git.ucc.asn.au/?p=planet-ucc.git;a=blobdiff_plain;f=RSS1Writer.py;h=678f98d1a9f4d7e7462e9208284473a011201632;hp=638047e9d7e27fe2d1f457734cfc63356ad55a64;hb=52296aaabfab3fd89036e1acca23cd26d2a00173;hpb=362f28bf34165e9d96e33379c7c43fb77fab6810 diff --git a/RSS1Writer.py b/RSS1Writer.py index 638047e..678f98d 100644 --- a/RSS1Writer.py +++ b/RSS1Writer.py @@ -2,12 +2,11 @@ # RSS1Writer # # A plugin to XMLWriter to output RSS version 1.0. -# This plugin has been developed with no regard for the RSS1.0 spec. # # (c) 2004, Davyd Madeley # -import time +import time, cgi class RSS1Writer: def __init__(self, planet): @@ -20,9 +19,9 @@ class RSS1Writer: output += '\n' % item.itemURL output += ' %s: %s\n' % (item.blogTitle, item.itemTitle) output += ' %s\n' % item.itemURL - output += ' \n' - output += item.contents - output += '\n \n' + output += ' \n' + output += cgi.escape(item.contents) + output += '\n \n' output += ' %s\n' % time.strftime('%Y-%m-%dT%H:%M:%S+00:00', time.gmtime(item.itemDate)) output += '\n' return output @@ -30,9 +29,9 @@ class RSS1Writer: def write(self): itemcount = 0 output = '' - output += '= self.maxitems: break - output += '\n' + output += '' return output