1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00

encode path for using in URI

This commit is contained in:
Daniel Pan
2015-04-08 18:26:23 +08:00
parent dd5128cb57
commit 9d6dfdabeb
4 changed files with 17 additions and 6 deletions

View File

@@ -216,10 +216,13 @@ define([
category: dir.category
};
var path_list = path.substr(1).split('/');
var path_list_encoded = path_list.map(function(e) { return encodeURIComponent(e); });
if (path != '/') {
$.extend(obj, {
path_list: path.substr(1).split('/'),
repo_id: dir.repo_id,
path_list: path_list,
path_list_encoded: path_list_encoded,
repo_id: dir.repo_id
});
}