[Python-checkins] r59877 - tracker/instances/python-dev/detectors/cia.py

georg.brandl python-checkins at python.org
Wed Jan 9 21:01:34 CET 2008


Author: georg.brandl
Date: Wed Jan  9 21:01:33 2008
New Revision: 59877

Modified:
   tracker/instances/python-dev/detectors/cia.py
Log:
Escape text strings when putting them into XML.


Modified: tracker/instances/python-dev/detectors/cia.py
==============================================================================
--- tracker/instances/python-dev/detectors/cia.py	(original)
+++ tracker/instances/python-dev/detectors/cia.py	Wed Jan  9 21:01:33 2008
@@ -1,13 +1,14 @@
 # Reactor for sending changes to CIA.vc
 import xmlrpclib
+import cgi
 
 server = "http://CIA.vc"
 
 parameters = {
     'name':'Roundup Reactor for CIA',
     'revision': "$Revision$"[11:-2],
-    'project': 'python',
-    'branch': 'Roundup',
+    'project': 'Python',
+    'branch': 'roundup',
     'urlprefix': 'http://bugs.python.org/issue',
 }
 
@@ -64,10 +65,10 @@
     log = log.replace('\n', ' ')
 
     params = parameters.copy()
-    params['file'] = db.issue.get(nodeid, 'title')
+    params['file'] = cgi.escape(db.issue.get(nodeid, 'title'))
     params['nodeid'] = nodeid
     params['author'] = db.user.get(db.getuid(), 'username')
-    params['log'] = log
+    params['log'] = cgi.escape(log)
 
     payload = TEMPLATE % params
 


More information about the Python-checkins mailing list