Skip to content

Commit 30d7397

Browse files
committed
Merge pull request #314 from nuss-justin/issue/312
Fix #312. Quote file names of attachments.
2 parents 0f3414e + ad7beb7 commit 30d7397

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

routers/repo/issue.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,5 +1079,7 @@ func IssueGetAttachment(ctx *middleware.Context, params martini.Params) {
10791079
return
10801080
}
10811081

1082-
ctx.ServeFile(attachment.Path, attachment.Name)
1082+
// Fix #312. Attachments with , in their name are not handled correctly by Google Chrome.
1083+
// We must put the name in " manually.
1084+
ctx.ServeFile(attachment.Path, "\"" + attachment.Name + "\"")
10831085
}

0 commit comments

Comments
 (0)