diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-07-25 01:14:33 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-07-25 01:14:33 -0400 |
commit | 30d7397f9745286282bce2dec960aa9e0e02af94 (patch) | |
tree | cb2d24700f6d11c76bba298f3deadedd0523c95f | |
parent | 0f3414ec394a5ebdd7137c487e8945d5ad2fad58 (diff) | |
parent | ad7beb78d0933e59103bf2862148431902ae2d91 (diff) | |
download | gitea-30d7397f9745286282bce2dec960aa9e0e02af94.tar.gz gitea-30d7397f9745286282bce2dec960aa9e0e02af94.zip |
Merge pull request #314 from nuss-justin/issue/312
Fix #312. Quote file names of attachments.
-rw-r--r-- | routers/repo/issue.go | 4 |
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 + "\"") } |