Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-05-16 15:09:37 +0400
committerThomas Tanghus <thomas@tanghus.net>2013-05-16 15:09:37 +0400
commit17b44bfacbb003efd1e4976337d5778476f590d3 (patch)
tree298e9635b83fe2969c1614da3fc8c18aa95a8e68
parent038f00d455e8219bd5063d4c995999e6a7fef851 (diff)
Escape file name in filepicker
-rw-r--r--core/js/oc-dialogs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index 0fa41696a16..fea41b1e0e3 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -216,7 +216,7 @@ OCdialogs = {
var entry_template = '<div onclick="javascript:OC.dialogs.handlePickerClick(this, \'*ENTRYNAME*\',\''+dialog_content_id+'\')" data="*ENTRYTYPE*"><img src="*MIMETYPEICON*" style="margin-right:1em;"><span id="filename">*NAME*</span><div style="float:right;margin-right:1em;">*LASTMODDATE*</div></div>';
var names = '';
for (var a in r.data) {
- names += entry_template.replace('*LASTMODDATE*', OC.mtime2date(r.data[a].mtime)).replace('*NAME*', r.data[a].name).replace('*MIMETYPEICON*', r.data[a].mimetype_icon).replace('*ENTRYNAME*', r.data[a].name).replace('*ENTRYTYPE*', r.data[a].type);
+ names += entry_template.replace('*LASTMODDATE*', OC.mtime2date(r.data[a].mtime)).replace('*NAME*', escapeHTML(r.data[a].name)).replace('*MIMETYPEICON*', r.data[a].mimetype_icon).replace('*ENTRYNAME*', escapeHTML(r.data[a].name)).replace('*ENTRYTYPE*', r.data[a].type);
}
$(dialog_content_id + ' #filelist').html(names);
$(dialog_content_id + ' .filepicker_loader').css('visibility', 'hidden');