Update jstree

This commit is contained in:
Buu Nguyen 2014-05-25 08:26:07 -07:00
parent c82c94a199
commit ca6219e372
2 changed files with 3 additions and 2 deletions

View File

@ -202,6 +202,7 @@
type = item.type
index = path.lastIndexOf('/')
name = $dummyDiv.text(path.substring(index + 1)).html() // sanitizes, closes #9
item.id = PREFIX + path
item.text = name
item.icon = type // use `type` as class name for tree node
@ -213,7 +214,7 @@
item.a_attr = { href: '#' }
}
else if (type === 'blob') {
item.a_attr = { href: '/' + repo.username + '/' + repo.reponame + '/' + type + '/' + repo.branch + '/' + path }
item.a_attr = { href: '/' + repo.username + '/' + repo.reponame + '/' + type + '/' + repo.branch + '/' + encodeURIComponent(path) /* closes #97 */ }
}
else if (type === 'commit') {
var moduleUrl = submodules[item.path]

View File

@ -85,7 +85,7 @@
*/
plugins : {},
path : src && src.indexOf('/') !== -1 ? src.replace(/\/[^\/]+$/,'') : '',
idregex : /[\\:&'".,=\- \/$]/g
idregex : /[\\:&!^|()\[\]<>@*'+~#";.,=\- \/$]/g
};
/**
* creates a jstree instance