diff --git a/IPython/html/notebook/handlers.py b/IPython/html/notebook/handlers.py
index 1fe0d08..0867400 100644
--- a/IPython/html/notebook/handlers.py
+++ b/IPython/html/notebook/handlers.py
@@ -52,15 +52,14 @@ class NamedNotebookHandler(IPythonHandler):
nbm = self.notebook_manager
name, path = nbm.named_notebook_path(notebook_path)
if name != None:
- name = quote(name)
+ name = nbm.url_encode(name)
if path == None:
project = self.project + '/' + name
else:
project = self.project + '/' + path +'/'+ name
+ path = nbm.url_encode(path)
if not nbm.notebook_exists(notebook_path):
raise web.HTTPError(404, u'Notebook does not exist: %s' % name)
- path = nbm.url_encode(path)
- name = nbm.url_encode(name)
self.write(self.render_template('notebook.html',
project=project,
notebook_path=path,
diff --git a/IPython/html/static/notebook/js/main.js b/IPython/html/static/notebook/js/main.js
index 999c01d..d273bd1 100644
--- a/IPython/html/static/notebook/js/main.js
+++ b/IPython/html/static/notebook/js/main.js
@@ -50,6 +50,7 @@ function (marked) {
var notebookPath = $('body').data('notebookPath');
var notebookName = $('body').data('notebookName');
notebookName = decodeURIComponent(notebookName);
+ notebookPath = decodeURIComponent(notebookPath);
console.log(notebookName);
if (notebookPath == 'None'){
notebookPath = "";
diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js
index cc8fac1..dde4d93 100644
--- a/IPython/html/static/notebook/js/notebook.js
+++ b/IPython/html/static/notebook/js/notebook.js
@@ -85,6 +85,7 @@ var IPython = (function (IPython) {
Notebook.prototype.notebookPath = function() {
var path = $('body').data('notebookPath');
+ path = decodeURIComponent(path);
if (path != 'None') {
if (path[path.length-1] != '/') {
path = path.substring(0,path.length);
diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js
index 257a78d..d95cc30 100644
--- a/IPython/html/static/tree/js/notebooklist.js
+++ b/IPython/html/static/tree/js/notebooklist.js
@@ -28,6 +28,7 @@ var IPython = (function (IPython) {
NotebookList.prototype.notebookPath = function() {
var path = $('body').data('notebookPath');
+ path = decodeURIComponent(path);
if (path != "") {
if (path[path.length-1] != '/') {
path = path.substring(0,path.length);