Show More
@@ -15,7 +15,7 b' var IPython = (function (IPython) {' | |||
|
15 | 15 | |
|
16 | 16 | var SaveWidget = function (selector) { |
|
17 | 17 | this.selector = selector; |
|
18 |
this.notebook_name_re = /[ |
|
|
18 | this.notebook_name_blacklist_re = /[\/\\]/ | |
|
19 | 19 | this.last_saved_name = ''; |
|
20 | 20 | if (this.selector !== undefined) { |
|
21 | 21 | this.element = $(selector); |
@@ -100,14 +100,14 b' var IPython = (function (IPython) {' | |||
|
100 | 100 | |
|
101 | 101 | SaveWidget.prototype.test_notebook_name = function () { |
|
102 | 102 | var nbname = this.get_notebook_name(); |
|
103 | if (this.notebook_name_re.test(nbname)) { | |
|
103 | if (this.notebook_name_blacklist_re.test(nbname) == false) { | |
|
104 | 104 | return true; |
|
105 | 105 | } else { |
|
106 | 106 | var bad_name = $('<div/>'); |
|
107 | 107 | bad_name.html( |
|
108 | 108 | "The notebook name you entered (" + |
|
109 | 109 | nbname + |
|
110 | ") is not valid. Notebook names can contain any characters except / and \\" | |
|
110 | ") is not valid. Notebook names can contain any characters except / and \\." | |
|
111 | 111 | ); |
|
112 | 112 | bad_name.dialog({title: 'Invalid name', modal: true}); |
|
113 | 113 | return false; |
General Comments 0
You need to be logged in to leave comments.
Login now