##// END OF EJS Templates
Backport PR #6878: Update pygments monkeypatch for compatibility with Pygments 2.0...
Backport PR #6878: Update pygments monkeypatch for compatibility with Pygments 2.0 Closes gh-6877 I spent a while looking for a better way to achive this, to get rid of the monkeypatch, but none occurred to me, so I went with Carlos' suggestion of just updating it.

File last commit:

r15201:029ac024
r20382:79516ce7
Show More
inject_js.js
23 lines | 648 B | application/javascript | JavascriptLexer
Matthias BUSSONNIER
XSS casper test
r14680 //
// Test robustness about JS injection in different place
//
// This assume malicious document arrive to the frontend.
//
casper.notebook_test(function () {
var messages = [];
this.on('remote.alert', function (msg) {
messages.push(msg);
});
this.evaluate(function () {
var cell = IPython.notebook.get_cell(0);
Paul Ivanov
make the JS test fail
r14692 var json = cell.toJSON();
json.prompt_number = "<script> alert('hello from input prompts !')</script>";
cell.fromJSON(json);
Matthias BUSSONNIER
XSS casper test
r14680 });
this.then(function () {
this.test.assert(messages.length == 0, "Captured log message from script tag injection !");
});
});