diff --git a/fs.go b/fs.go
index 53a701e..b029fd7 100644
--- a/fs.go
+++ b/fs.go
@@ -526,7 +526,11 @@ func (h *fsHandler) createDirIndex(base *URI, filePath string) (*fsFile, error)
fmt.Fprintf(w, "
")
if len(basePathEscaped) > 1 {
- fmt.Fprintf(w, `- ..
`)
+ var parentURI URI
+ base.CopyTo(&parentURI)
+ parentURI.Update("..")
+ parentPathEscaped := html.EscapeString(string(parentURI.Path()))
+ fmt.Fprintf(w, `- ..
`, parentPathEscaped)
}
f, err := os.Open(filePath)