Changeset 965

Show
Ignore:
Timestamp:
06/27/06 14:53:29 (2 years ago)
Author:
GraemeWorthy
Message:

RssGetMacro:

fixes #444

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • rssgetmacro/0.9/RSSget.py

    r832 r965  
    2323import httplib 
    2424import urllib2 
     25import cgi 
    2526import StringIO 
    2627from xml.dom import minidom 
     
    133134        filename = create_filename(url) 
    134135        #make sure the directory's there 
    135         _mkdir(CACHE_DIR + CACHE_ID) 
     136        _mkdir(CACHE_DIR + "/" + CACHE_ID) 
    136137        #open the right file 
    137138        cachefile = open(CACHE_DIR + "/" + CACHE_ID + "/" + filename, 'w') 
     
    172173        for Item in Itemlist: 
    173174                for node2 in Item.getElementsByTagName("title"): 
    174                         title = node2.firstChild.data 
     175                        title = cgi.escape(node2.firstChild.data) 
    175176                        titles.append(title) 
    176177                for node2 in Item.getElementsByTagName("link"): 
    177                         link = node2.firstChild.data 
     178                        link = cgi.escape(node2.firstChild.data) 
    178179                        links.append(link) 
    179180                for node2 in Item.getElementsByTagName("description"): 
    180                         description = node2.firstChild.data 
     181                        description = cgi.escape(node2.firstChild.data) 
    181182                        words.append(description) 
    182183