diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 93af10900aa..eac95cab96a 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -103,8 +103,9 @@ def list_directory(self, path): return None list.sort(key=lambda a: a.lower()) f = StringIO() - f.write("Directory listing for %s\n" % self.path) - f.write("

Directory listing for %s

\n" % self.path) + displaypath = cgi.escape(urllib.unquote(self.path)) + f.write("Directory listing for %s\n" % displaypath) + f.write("

Directory listing for %s

\n" % displaypath) f.write("
\n