Commit 90fbc904 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Quote href

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13676 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 742519dd
......@@ -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 @@ class DirectoryFileHandler(FileHandler):
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' %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment