summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorJustin <nuss.justin@gmail.com>2014-07-24 23:13:35 +0200
committerJustin <nuss.justin@gmail.com>2014-07-24 23:13:35 +0200
commitad7beb78d0933e59103bf2862148431902ae2d91 (patch)
treed5f34f45c43d76f79d6cf0f01db8e115d4feeda9 /routers
parentc4eeb803e1d77b563a3e6a5c67a78c38858d4e76 (diff)
downloadgitea-ad7beb78d0933e59103bf2862148431902ae2d91.tar.gz
gitea-ad7beb78d0933e59103bf2862148431902ae2d91.zip
Fix #312. Quote file names of attachments.
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index f3d9280644..a5a2a28eca 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -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 + "\"")
}