diff --git a/seahub/templates/view_shared_upload_link.html b/seahub/templates/view_shared_upload_link.html index a7b9682dbd..720e4cf90a 100644 --- a/seahub/templates/view_shared_upload_link.html +++ b/seahub/templates/view_shared_upload_link.html @@ -25,7 +25,7 @@ {% endif %} - @@ -57,6 +57,15 @@ {% if not no_quota %} {% upload_js %} + {% endif %} diff --git a/static/scripts/app/views/dir.js b/static/scripts/app/views/dir.js index 02a2d16d6b..6137e823dd 100644 --- a/static/scripts/app/views/dir.js +++ b/static/scripts/app/views/dir.js @@ -250,7 +250,7 @@ define([ }; var path_list = path.substr(1).split('/'); - var path_list_encoded = path_list.map(function(e) { return encodeURIComponent(e); }); + var path_list_encoded = Common.encodePath(path.substr(1)).split('/'); if (path != '/') { $.extend(obj, { path_list: path_list, diff --git a/static/scripts/common.js b/static/scripts/common.js index d3e2c0de87..9245939930 100644 --- a/static/scripts/common.js +++ b/static/scripts/common.js @@ -302,9 +302,19 @@ define([ }, encodePath: function(path) { + // IE8 does not support 'map()' + /* return path.split('/').map(function(e) { return encodeURIComponent(e); }).join('/'); + */ + + var path_arr = path.split('/'), + path_arr_ = []; + for (var i = 0, len = path_arr.length; i < len; i++) { + path_arr_.push(encodeURIComponent(path_arr[i])); + } + return path_arr_.join('/'); }, closePopup: function(e, popup, popup_switch) {