We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08caadc commit 6ee6952Copy full SHA for 6ee6952
Lib/SimpleHTTPServer.py
@@ -103,8 +103,9 @@ def list_directory(self, path):
103
return None
104
list.sort(key=lambda a: a.lower())
105
f = StringIO()
106
- f.write("<title>Directory listing for %s</title>\n" % self.path)
107
- 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)
108
+ f.write("<h2>Directory listing for %s</h2>\n" % displaypath)
109
f.write("<hr>\n<ul>\n")
110
for name in list:
111
fullname = os.path.join(path, name)
0 commit comments