From ad7beb78d0933e59103bf2862148431902ae2d91 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 24 Jul 2014 23:13:35 +0200 Subject: [PATCH] Fix #312. Quote file names of attachments. --- routers/repo/issue.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index f3d92806..a5a2a28e 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 + "\"") }