encodeURIComponent on dirname

This commit is contained in:
Victor Dubiniuk 2014-11-19 23:40:19 +03:00
parent 4f61ee2a5e
commit 39e72cbbcf

View File

@ -63,7 +63,7 @@ var odfViewer = {
} else {
//Public page, files app, etc
var dirName = $('#dir').val()!='/' ? $('#dir').val() + '/' : '/';
var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + dirName + encodeURIComponent(filename)
var location = OC.filePath('documents', 'ajax', 'download.php') + '?path=' + encodeURIComponent(dirName) + encodeURIComponent(filename)
+ '&requesttoken=' + oc_requesttoken;
OC.addStyle('documents', '3rdparty/webodf/editor');
}