summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-06-15 10:02:11 -0800
committerCorey Hulen <corey@hulen.com>2015-06-15 10:02:11 -0800
commit916df982523d62dbacb9f0204c6024b0fffc3530 (patch)
tree79da3340d0c6cf7fa7612fc3cd4ae78b9224e75a /api
parent334261ece1bd312678f8eb65b2fde3f636a0475d (diff)
parentadceb8c929b57d8c320b9b39167fb25f04ca99a1 (diff)
downloadchat-916df982523d62dbacb9f0204c6024b0fffc3530.tar.gz
chat-916df982523d62dbacb9f0204c6024b0fffc3530.tar.bz2
chat-916df982523d62dbacb9f0204c6024b0fffc3530.zip
Merge pull request #4 from mattermost/mm-1245
fixes mm-1245 filenames are now url escaped
Diffstat (limited to 'api')
-rw-r--r--api/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/file.go b/api/file.go
index c7c3b7b3e..10167c6ff 100644
--- a/api/file.go
+++ b/api/file.go
@@ -114,7 +114,7 @@ func uploadFile(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- fileUrl := c.TeamUrl + "/api/v1/files/get/" + channelId + "/" + c.Session.UserId + "/" + uid + "/" + files[i].Filename
+ fileUrl := c.TeamUrl + "/api/v1/files/get/" + channelId + "/" + c.Session.UserId + "/" + uid + "/" + url.QueryEscape(files[i].Filename)
resStruct.Filenames = append(resStruct.Filenames, fileUrl)
}