mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
avoid injection in input prompt
This commit is contained in:
parent
da001113fa
commit
f5fa732bd3
@ -409,7 +409,12 @@ var IPython = (function (IPython) {
|
|||||||
|
|
||||||
|
|
||||||
CodeCell.input_prompt_classical = function (prompt_value, lines_number) {
|
CodeCell.input_prompt_classical = function (prompt_value, lines_number) {
|
||||||
var ns = prompt_value || " ";
|
var ns;
|
||||||
|
if (prompt_value == undefined) {
|
||||||
|
ns = " ";
|
||||||
|
} else {
|
||||||
|
ns = encodeURIComponent(prompt_value);
|
||||||
|
}
|
||||||
return 'In [' + ns + ']:';
|
return 'In [' + ns + ']:';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user