URL escape filenames in directory lisitngs.

This commit is contained in:
Solderpunk 2020-05-19 22:03:44 +02:00
parent 590aa672a2
commit 06809edfcc
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ func generateDirectoryListing(path string) string {
if uint64(file.Mode().Perm())&0444 != 0444 {
continue
}
listing += fmt.Sprintf("=> %s %s\n", file.Name(), file.Name())
listing += fmt.Sprintf("=> %s %s\n", url.PathEscape(file.Name()), file.Name())
}
return listing
}