vakata/jstree — Issue #147: double escaped special characters in node selectors
Author: karol-gwaj
Created: 2011-12-11 21:28:00+00:00
State: open

looks like there is problem with double escaping special characters (in my case ':') in node selectors when saving open nodes before refresh (so they are not restored after refresh)

- First time in save_opened function:

save_opened : function () {
var _this = this;
this.data.core.to_open = [];
this.get_container_ul().find("li.jstree-open").each(function () {
if(this.id) { _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")); }
});
this.__callback(_this.data.core.to_open);
}

- Second time in reload_nodes function:

reload_nodes : function (is_callback) {
...
this.data.core.to_open = $.map($.makeArray(this.data.core.to_open), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
...
}

i have enabled following plugins: ['themes', 'json_data', 'ui', 'crrm']