From 3e37620cc23718baa35f5a8627bc437b2910a7e1 Mon Sep 17 00:00:00 2001 From: imsolost Date: Fri, 18 Jan 2019 15:09:13 -0800 Subject: fixed replacement functions to catch all instances of parenthesis Signed-off-by: imsolost --- apps/files/js/filelist.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'apps') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 29c5a49131d..cbe51aad42d 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1674,7 +1674,7 @@ c: fileData.etag }; var previewUrl = this.generatePreviewUrl(urlSpec); - previewUrl = previewUrl.replace('(', '%28').replace(')', '%29'); + previewUrl = previewUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'); iconDiv.css('background-image', 'url("' + previewUrl + '")'); } } @@ -2058,8 +2058,7 @@ } previewURL = self.generatePreviewUrl(urlSpec); - previewURL = previewURL.replace('(', '%28'); - previewURL = previewURL.replace(')', '%29'); + previewUrl = previewUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'); // preload image to prevent delay // this will make the browser cache the image -- cgit v1.2.3 From 5742ec79ab28d618e54fece89f8659a4f574eee8 Mon Sep 17 00:00:00 2001 From: imsolost Date: Fri, 25 Jan 2019 09:36:45 -0800 Subject: changed case on variable to match initial case Signed-off-by: imsolost --- apps/files/js/filelist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index cbe51aad42d..7ba650eb183 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2058,7 +2058,7 @@ } previewURL = self.generatePreviewUrl(urlSpec); - previewUrl = previewUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'); + previewURL = previewURL.replace(/\(/g, '%28').replace(/\)/g, '%29'); // preload image to prevent delay // this will make the browser cache the image -- cgit v1.2.3