A file name must not contain '#'

This commit is contained in:
Las Zenow 2012-10-25 01:08:05 +02:00
parent cd9b518284
commit 2f2908e4fe

View file

@ -165,6 +165,7 @@ func newHandler(w http.ResponseWriter, r *http.Request) {
func ValidFileName(path string, title string, extension string) string {
title = strings.Replace(title, "/", "_", -1)
title = strings.Replace(title, "?", "_", -1)
title = strings.Replace(title, "#", "_", -1)
file := path + "/" + title + extension
_, err := os.Stat(file)
for i := 0; err == nil; i++ {