URL escape filenames in directory lisitngs.
This commit is contained in:
parent
590aa672a2
commit
06809edfcc
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue