[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] queue_rss.py: use `html.escape` instead of deprecated `cgi.escape`



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

1 changed file:

Changes:

  • tools/queue_rss.py
    ... ... @@ -5,7 +5,7 @@
    5 5
     # Author: Filippo Giunchedi <filippo@debian.org>
    
    6 6
     # Version: 0.5
    
    7 7
     
    
    8
    -import cgi
    
    8
    +import html
    
    9 9
     import os
    
    10 10
     import os.path
    
    11 11
     import pickle
    
    ... ... @@ -141,8 +141,8 @@ def add_rss_item(status, msg, direction):
    141 141
             return False
    
    142 142
     
    
    143 143
         description = "<pre>Description: %s\nChanges: %s\n</pre>" % \
    
    144
    -            (cgi.escape(msg['Description']),
    
    145
    -             cgi.escape(msg['Changes']))
    
    144
    +            (html.escape(msg['Description']),
    
    145
    +             html.escape(msg['Changes']))
    
    146 146
     
    
    147 147
         link = "https://ftp-master.debian.org/new/%s_%s.html" % \
    
    148 148
                 (msg['Source'], msg['Version'])
    
    ... ... @@ -159,7 +159,7 @@ def add_rss_item(status, msg, direction):
    159 159
                 title,
    
    160 160
                 pubDate=pubdate,
    
    161 161
                 description=description,
    
    162
    -            author=cgi.escape(author),
    
    162
    +            author=html.escape(author),
    
    163 163
                 link=link,
    
    164 164
                 guid=guid
    
    165 165
             )
    


  • Reply to: