Show More
@@ -52,15 +52,14 b' class NamedNotebookHandler(IPythonHandler):' | |||||
52 | nbm = self.notebook_manager |
|
52 | nbm = self.notebook_manager | |
53 | name, path = nbm.named_notebook_path(notebook_path) |
|
53 | name, path = nbm.named_notebook_path(notebook_path) | |
54 | if name != None: |
|
54 | if name != None: | |
55 |
name = |
|
55 | name = nbm.url_encode(name) | |
56 | if path == None: |
|
56 | if path == None: | |
57 | project = self.project + '/' + name |
|
57 | project = self.project + '/' + name | |
58 | else: |
|
58 | else: | |
59 | project = self.project + '/' + path +'/'+ name |
|
59 | project = self.project + '/' + path +'/'+ name | |
|
60 | path = nbm.url_encode(path) | |||
60 | if not nbm.notebook_exists(notebook_path): |
|
61 | if not nbm.notebook_exists(notebook_path): | |
61 | raise web.HTTPError(404, u'Notebook does not exist: %s' % name) |
|
62 | raise web.HTTPError(404, u'Notebook does not exist: %s' % name) | |
62 | path = nbm.url_encode(path) |
|
|||
63 | name = nbm.url_encode(name) |
|
|||
64 | self.write(self.render_template('notebook.html', |
|
63 | self.write(self.render_template('notebook.html', | |
65 | project=project, |
|
64 | project=project, | |
66 | notebook_path=path, |
|
65 | notebook_path=path, |
@@ -50,6 +50,7 b' function (marked) {' | |||||
50 | var notebookPath = $('body').data('notebookPath'); |
|
50 | var notebookPath = $('body').data('notebookPath'); | |
51 | var notebookName = $('body').data('notebookName'); |
|
51 | var notebookName = $('body').data('notebookName'); | |
52 | notebookName = decodeURIComponent(notebookName); |
|
52 | notebookName = decodeURIComponent(notebookName); | |
|
53 | notebookPath = decodeURIComponent(notebookPath); | |||
53 | console.log(notebookName); |
|
54 | console.log(notebookName); | |
54 | if (notebookPath == 'None'){ |
|
55 | if (notebookPath == 'None'){ | |
55 | notebookPath = ""; |
|
56 | notebookPath = ""; |
@@ -85,6 +85,7 b' var IPython = (function (IPython) {' | |||||
85 |
|
85 | |||
86 | Notebook.prototype.notebookPath = function() { |
|
86 | Notebook.prototype.notebookPath = function() { | |
87 | var path = $('body').data('notebookPath'); |
|
87 | var path = $('body').data('notebookPath'); | |
|
88 | path = decodeURIComponent(path); | |||
88 | if (path != 'None') { |
|
89 | if (path != 'None') { | |
89 | if (path[path.length-1] != '/') { |
|
90 | if (path[path.length-1] != '/') { | |
90 | path = path.substring(0,path.length); |
|
91 | path = path.substring(0,path.length); |
@@ -28,6 +28,7 b' var IPython = (function (IPython) {' | |||||
28 |
|
28 | |||
29 | NotebookList.prototype.notebookPath = function() { |
|
29 | NotebookList.prototype.notebookPath = function() { | |
30 | var path = $('body').data('notebookPath'); |
|
30 | var path = $('body').data('notebookPath'); | |
|
31 | path = decodeURIComponent(path); | |||
31 | if (path != "") { |
|
32 | if (path != "") { | |
32 | if (path[path.length-1] != '/') { |
|
33 | if (path[path.length-1] != '/') { | |
33 | path = path.substring(0,path.length); |
|
34 | path = path.substring(0,path.length); |
General Comments 0
You need to be logged in to leave comments.
Login now