Skip to content

Commit

Permalink
Merge pull request #8551 from joesitton/fix-upload-uri-error
Browse files Browse the repository at this point in the history
[FIX] encode filename in url to prevent links breaking
  • Loading branch information
rodrigok committed Oct 25, 2017
1 parent 111a53d commit 1e99e7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Meteor.methods({

RocketChat.models.Uploads.updateFileComplete(file._id, Meteor.userId(), _.omit(file, '_id'));

const fileUrl = `/file-upload/${ file._id }/${ file.name }`;
const fileUrl = `/file-upload/${ file._id }/${ encodeURI(file.name) }`;

const attachment = {
title: file.name,
Expand Down

0 comments on commit 1e99e7b

Please sign in to comment.