0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 09:24:07 -05:00

Fix #312. Quote file names of attachments.

This commit is contained in:
Justin 2014-07-24 23:13:35 +02:00
parent c4eeb803e1
commit ad7beb78d0

View file

@ -1079,5 +1079,7 @@ func IssueGetAttachment(ctx *middleware.Context, params martini.Params) {
return
}
ctx.ServeFile(attachment.Path, attachment.Name)
// Fix #312. Attachments with , in their name are not handled correctly by Google Chrome.
// We must put the name in " manually.
ctx.ServeFile(attachment.Path, "\"" + attachment.Name + "\"")
}