forked from solderpunk/molly-brown
URL escape filenames in directory lisitngs.
This commit is contained in:
parent
590aa672a2
commit
06809edfcc
|
@ -215,7 +215,7 @@ func generateDirectoryListing(path string) string {
|
||||||
if uint64(file.Mode().Perm())&0444 != 0444 {
|
if uint64(file.Mode().Perm())&0444 != 0444 {
|
||||||
continue
|
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
|
return listing
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue