diff --git a/IPython/html/static/notebook/js/menubar.js b/IPython/html/static/notebook/js/menubar.js
index 85419f5..7de2345 100644
--- a/IPython/html/static/notebook/js/menubar.js
+++ b/IPython/html/static/notebook/js/menubar.js
@@ -77,7 +77,7 @@ var IPython = (function (IPython) {
IPython.notebook.new_notebook();
});
this.element.find('#open_notebook').click(function () {
- window.open(utils.url_path_join(
+ window.open(utils.url_join_encode(
that.baseProjectUrl(),
'tree',
that.notebookPath()
@@ -93,7 +93,7 @@ var IPython = (function (IPython) {
IPython.notebook.save_notebook({async : false});
}
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
that.baseProjectUrl(),
'files',
that.notebookPath(),
diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js
index 67a27a7..7235e6e 100644
--- a/IPython/html/static/notebook/js/notebook.js
+++ b/IPython/html/static/notebook/js/notebook.js
@@ -79,15 +79,11 @@ var IPython = (function (IPython) {
};
Notebook.prototype.notebookName = function() {
- var name = $('body').data('notebookName');
- name = decodeURIComponent(name);
- return name;
+ return $('body').data('notebookName');
};
Notebook.prototype.notebookPath = function() {
- var path = $('body').data('notebookPath');
- path = decodeURIComponent(path);
- return path
+ return $('body').data('notebookPath');
};
/**
@@ -1689,10 +1685,10 @@ var IPython = (function (IPython) {
}
}
$([IPython.events]).trigger('notebook_saving.Notebook');
- var url = utils.url_path_join(
- this.baseProjectUrl(),
+ var url = utils.url_join_encode(
+ this._baseProjectUrl,
'api/notebooks',
- this.notebookPath(),
+ this.notebook_path,
this.notebook_name
);
$.ajax(url, settings);
@@ -1750,8 +1746,8 @@ var IPython = (function (IPython) {
};
Notebook.prototype.new_notebook = function(){
- var path = this.notebookPath();
- var base_project_url = this.baseProjectUrl();
+ var path = this.notebook_path;
+ var base_project_url = this._baseProjectUrl;
var settings = {
processData : false,
cache : false,
@@ -1761,7 +1757,7 @@ var IPython = (function (IPython) {
success : function (data, status, xhr){
var notebook_name = data.name;
window.open(
- utils.url_path_join(
+ utils.url_join_encode(
base_project_url,
'notebooks',
path,
@@ -1771,7 +1767,7 @@ var IPython = (function (IPython) {
);
}
};
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
base_project_url,
'api/notebooks',
path
@@ -1781,8 +1777,8 @@ var IPython = (function (IPython) {
Notebook.prototype.copy_notebook = function(){
- var path = this.notebookPath();
- var base_project_url = this.baseProjectUrl();
+ var path = this.notebook_path;
+ var base_project_url = this._baseProjectUrl;
var settings = {
processData : false,
cache : false,
@@ -1791,7 +1787,7 @@ var IPython = (function (IPython) {
data : JSON.stringify({copy_from : this.notebook_name}),
async : false,
success : function (data, status, xhr) {
- window.open(utils.url_path_join(
+ window.open(utils.url_join_encode(
base_project_url,
'notebooks',
data.path,
@@ -1799,7 +1795,7 @@ var IPython = (function (IPython) {
), '_blank');
}
};
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
base_project_url,
'api/notebooks',
path
@@ -1821,10 +1817,10 @@ var IPython = (function (IPython) {
error : $.proxy(that.rename_error, this)
};
$([IPython.events]).trigger('rename_notebook.Notebook', data);
- var url = utils.url_path_join(
- this.baseProjectUrl(),
+ var url = utils.url_join_encode(
+ this._baseProjectUrl,
'api/notebooks',
- this.notebookPath(),
+ this.notebook_path,
this.notebook_name
);
$.ajax(url, settings);
@@ -1832,9 +1828,9 @@ var IPython = (function (IPython) {
Notebook.prototype.rename_success = function (json, status, xhr) {
- this.notebook_name = json.name
- var name = this.notebook_name
- var path = json.path
+ this.notebook_name = json.name;
+ var name = this.notebook_name;
+ var path = json.path;
this.session.rename_notebook(name, path);
$([IPython.events]).trigger('notebook_renamed.Notebook', json);
}
@@ -1889,10 +1885,10 @@ var IPython = (function (IPython) {
error : $.proxy(this.load_notebook_error,this),
};
$([IPython.events]).trigger('notebook_loading.Notebook');
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
this._baseProjectUrl,
'api/notebooks',
- this.notebookPath(),
+ this.notebook_path,
this.notebook_name
);
$.ajax(url, settings);
@@ -2027,10 +2023,10 @@ var IPython = (function (IPython) {
* @method list_checkpoints
*/
Notebook.prototype.list_checkpoints = function () {
- var url = utils.url_path_join(
- this.baseProjectUrl(),
+ var url = utils.url_join_encode(
+ this._baseProjectUrl,
'api/notebooks',
- this.notebookPath(),
+ this.notebook_path,
this.notebook_name,
'checkpoints'
);
@@ -2078,8 +2074,8 @@ var IPython = (function (IPython) {
* @method create_checkpoint
*/
Notebook.prototype.create_checkpoint = function () {
- var url = utils.url_path_join(
- this.baseProjectUrl(),
+ var url = utils.url_join_encode(
+ this._baseProjectUrl,
'api/notebooks',
this.notebookPath(),
this.notebook_name,
@@ -2165,8 +2161,8 @@ var IPython = (function (IPython) {
*/
Notebook.prototype.restore_checkpoint = function (checkpoint) {
$([IPython.events]).trigger('notebook_restoring.Notebook', checkpoint);
- var url = utils.url_path_join(
- this.baseProjectUrl(),
+ var url = utils.url_join_encode(
+ this._baseProjectUrl,
'api/notebooks',
this.notebookPath(),
this.notebook_name,
@@ -2213,8 +2209,8 @@ var IPython = (function (IPython) {
*/
Notebook.prototype.delete_checkpoint = function (checkpoint) {
$([IPython.events]).trigger('notebook_restoring.Notebook', checkpoint);
- var url = utils.url_path_join(
- this.baseProjectUrl(),
+ var url = utils.url_join_encode(
+ this._baseProjectUrl,
'api/notebooks',
this.notebookPath(),
this.notebook_name,
diff --git a/IPython/html/static/notebook/js/savewidget.js b/IPython/html/static/notebook/js/savewidget.js
index 56e62f3..8a0183c 100644
--- a/IPython/html/static/notebook/js/savewidget.js
+++ b/IPython/html/static/notebook/js/savewidget.js
@@ -128,8 +128,8 @@ var IPython = (function (IPython) {
SaveWidget.prototype.update_address_bar = function(){
var nbname = IPython.notebook.notebook_name;
var path = IPython.notebook.notebookPath();
- var state = {path : utils.url_path_join(path,nbname)};
- window.history.replaceState(state, "", utils.url_path_join(
+ var state = {path : utils.url_join_encode(path, nbname)};
+ window.history.replaceState(state, "", utils.url_join_encode(
"/notebooks",
path,
nbname)
diff --git a/IPython/html/static/services/kernels/js/kernel.js b/IPython/html/static/services/kernels/js/kernel.js
index 9aa91aa..c1badfb 100644
--- a/IPython/html/static/services/kernels/js/kernel.js
+++ b/IPython/html/static/services/kernels/js/kernel.js
@@ -113,7 +113,7 @@ var IPython = (function (IPython) {
$([IPython.events]).trigger('status_restarting.Kernel', {kernel: this});
if (this.running) {
this.stop_channels();
- var url = utils.url_path_join(this.kernel_url, "restart");
+ var url = utils.url_join_encode(this.kernel_url, "restart");
$.post(url,
$.proxy(this._kernel_started, this),
'json'
@@ -133,7 +133,7 @@ var IPython = (function (IPython) {
ws_url = prot + location.host + ws_url;
}
this.ws_url = ws_url;
- this.kernel_url = utils.url_path_join(this.base_url, this.kernel_id);
+ this.kernel_url = utils.url_join_encode(this.base_url, this.kernel_id);
this.start_channels();
};
diff --git a/IPython/html/static/services/sessions/js/session.js b/IPython/html/static/services/sessions/js/session.js
index a2bf694..0f0c4a9 100644
--- a/IPython/html/static/services/sessions/js/session.js
+++ b/IPython/html/static/services/sessions/js/session.js
@@ -44,7 +44,7 @@ var IPython = (function (IPython) {
}
},
};
- var url = utils.url_path_join(this._baseProjectUrl, 'api/sessions');
+ var url = utils.url_join_encode(this._baseProjectUrl, 'api/sessions');
$.ajax(url, settings);
};
@@ -64,7 +64,7 @@ var IPython = (function (IPython) {
data: JSON.stringify(model),
dataType : "json",
};
- var url = utils.url_path_join(this._baseProjectUrl, 'api/sessions', this.id);
+ var url = utils.url_join_encode(this._baseProjectUrl, 'api/sessions', this.id);
$.ajax(url, settings);
};
@@ -76,7 +76,7 @@ var IPython = (function (IPython) {
dataType : "json",
};
this.kernel.running = false;
- var url = utils.url_path_join(this._baseProjectUrl, 'api/sessions', this.id);
+ var url = utils.url_join_encode(this._baseProjectUrl, 'api/sessions', this.id);
$.ajax(url, settings);
};
diff --git a/IPython/html/static/tree/js/clusterlist.js b/IPython/html/static/tree/js/clusterlist.js
index 8be3b30..4108c12 100644
--- a/IPython/html/static/tree/js/clusterlist.js
+++ b/IPython/html/static/tree/js/clusterlist.js
@@ -51,7 +51,7 @@ var IPython = (function (IPython) {
dataType : "json",
success : $.proxy(this.load_list_success, this)
};
- var url = utils.url_path_join(this.baseProjectUrl(), 'clusters');
+ var url = utils.url_join_encode(this.baseProjectUrl(), 'clusters');
$.ajax(url, settings);
};
@@ -137,7 +137,7 @@ var IPython = (function (IPython) {
}
};
status_col.html('starting');
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
that.baseProjectUrl(),
'clusters',
that.data.profile,
@@ -179,7 +179,7 @@ var IPython = (function (IPython) {
}
};
status_col.html('stopping');
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
that.baseProjectUrl(),
'clusters',
that.data.profile,
diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js
index 5367c65..2ee7a19 100644
--- a/IPython/html/static/tree/js/notebooklist.js
+++ b/IPython/html/static/tree/js/notebooklist.js
@@ -147,7 +147,7 @@ var IPython = (function (IPython) {
},this)
};
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
this.baseProjectUrl(),
'api',
'notebooks',
@@ -177,7 +177,7 @@ var IPython = (function (IPython) {
var nbname = utils.splitext(name)[0];
var item = this.new_notebook_item(i);
this.add_link(path, nbname, item);
- name = utils.url_path_join(this.notebookPath(), name);
+ name = utils.url_path_join(path, name);
if(this.sessions[name] === undefined){
this.add_delete_button(item);
} else {
@@ -214,10 +214,10 @@ var IPython = (function (IPython) {
item.find(".item_name").text(nbname);
item.find("a.item_link")
.attr('href',
- utils.url_path_join(
+ utils.url_join_encode(
this.baseProjectUrl(),
"notebooks",
- this.notebookPath(),
+ path,
nbname + ".ipynb"
)
).attr('target','_blank');
@@ -254,7 +254,7 @@ var IPython = (function (IPython) {
that.load_sessions();
}
};
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
that.baseProjectUrl(),
'api/sessions',
session
@@ -294,11 +294,11 @@ var IPython = (function (IPython) {
parent_item.remove();
}
};
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
notebooklist.baseProjectUrl(),
'api/notebooks',
notebooklist.notebookPath(),
- nbname + '.ipynb'
+ nbname + '.ipynb'
);
$.ajax(url, settings);
}
@@ -339,7 +339,7 @@ var IPython = (function (IPython) {
}
};
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
that.baseProjectUrl(),
'api/notebooks',
that.notebookPath(),
@@ -373,7 +373,7 @@ var IPython = (function (IPython) {
success : function (data, status, xhr) {
var notebook_name = data.name;
window.open(
- utils.url_path_join(
+ utils.url_join_encode(
base_project_url,
'notebooks',
path,
@@ -382,7 +382,7 @@ var IPython = (function (IPython) {
);
}
};
- var url = utils.url_path_join(
+ var url = utils.url_join_encode(
base_project_url,
'api/notebooks',
path