avoid injection in input prompt

This commit is contained in:
Matthias BUSSONNIER 2014-01-23 13:29:11 +01:00
parent da001113fa
commit f5fa732bd3

View File

@ -409,7 +409,12 @@ var IPython = (function (IPython) {
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 + ']:';
};