[Erp5-report] r13676 - /erp5/trunk/products/ERP5/Tool/ContributionOpener.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 26 19:34:15 CEST 2007


Author: jp
Date: Mon Mar 26 19:34:14 2007
New Revision: 13676

URL: http://svn.erp5.org?rev=13676&view=rev
Log:
Quote href

Modified:
    erp5/trunk/products/ERP5/Tool/ContributionOpener.py

Modified: erp5/trunk/products/ERP5/Tool/ContributionOpener.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/ContributionOpener.py?rev=13676&r1=13675&r2=13676&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/ContributionOpener.py (original)
+++ erp5/trunk/products/ERP5/Tool/ContributionOpener.py Mon Mar 26 19:34:14 2007
@@ -15,7 +15,7 @@
 #
 ##############################################################################
 
-import urllib2, os, dircache
+import urllib2, os, dircache, urllib
 from StringIO import StringIO
 from urllib2 import FileHandler, url2pathname, mimetypes, mimetools, addinfourl, URLError
 
@@ -55,7 +55,7 @@
               file_list = dircache.listdir(localfile)
               s = StringIO()
               for f in file_list:
-                s.write('<p><a href="%s">%s</a></p>\n' % (f, f))
+                s.write('<p><a href="%s">%s</a></p>\n' % (urllib.quote(f), f))
               s.seek(0)
               headers = mimetools.Message(StringIO(
                   'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' %




More information about the Erp5-report mailing list