Use encodeURIComponent for encoding query params

This commit is contained in:
Girish Ramakrishnan
2019-03-04 12:59:41 -08:00
parent b0684ce29c
commit 6f32a0d6de
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
downloadUrl: function () {
if (!$scope.downloadFile.filePath) return '';
var filePath = $scope.downloadFile.filePath.replace(/\/*\//g, '/');
var filePath = encodeURIComponent($scope.downloadFile.filePath);
return Client.apiOrigin + '/api/v1/apps/' + $scope.selected.value + '/download?file=' + filePath + '&access_token=' + Client.getToken();
},