Remove '?' from filenames

This commit is contained in:
Las Zenow 2012-09-09 03:18:47 +02:00
parent 4b30b5c091
commit 3d69ce8e03

View file

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