diff options
Diffstat (limited to 'Lib/SimpleHTTPServer.py')
| -rw-r--r-- | Lib/SimpleHTTPServer.py | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 93af109..eac95ca 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -103,8 +103,9 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):              return None          list.sort(key=lambda a: a.lower())          f = StringIO() -        f.write("<title>Directory listing for %s</title>\n" % self.path) -        f.write("<h2>Directory listing for %s</h2>\n" % self.path) +        displaypath = cgi.escape(urllib.unquote(self.path)) +        f.write("<title>Directory listing for %s</title>\n" % displaypath) +        f.write("<h2>Directory listing for %s</h2>\n" % displaypath)          f.write("<hr>\n<ul>\n")          for name in list:              fullname = os.path.join(path, name)  | 
