diff --git a/static/scripts/common.js b/static/scripts/common.js index 92ee71cfdf..db79b82e7c 100644 --- a/static/scripts/common.js +++ b/static/scripts/common.js @@ -303,9 +303,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) {