1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-07-16 15:04:19 -04:00

Merge pull request #314 from nuss-justin/issue/312

Fix #312. Quote file names of attachments.
This commit is contained in:
无闻 2014-07-25 01:14:33 -04:00
commit 30d7397f97

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 + "\"")
}