summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorimsolost <imsolost@gmail.com>2019-01-18 15:09:13 -0800
committerimsolost <imsolost@gmail.com>2019-01-25 11:16:37 -0800
commit3e37620cc23718baa35f5a8627bc437b2910a7e1 (patch)
tree9935e56312592c1f36ef2dd47fe90df27158d00d /apps
parent67c304498e1b4bcb5aab3f2d9b5ad81a33983b17 (diff)
downloadnextcloud-server-3e37620cc23718baa35f5a8627bc437b2910a7e1.tar.gz
nextcloud-server-3e37620cc23718baa35f5a8627bc437b2910a7e1.zip
fixed replacement functions to catch all instances of parenthesis
Signed-off-by: imsolost <imsolost@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js5
1 files changed, 2 insertions, 3 deletions
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