1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Note about JavaScript sanitisation

This commit is contained in:
Jeremy Ruston 2011-12-28 16:09:49 +00:00
parent 143454f784
commit f381e95452

View File

@ -37,7 +37,7 @@ var sandbox = function(code,globals) {
out.push(";})"); out.push(";})");
// Parse the code // Parse the code
var tree = uglify.parser.parse(out.join("")); var tree = uglify.parser.parse(out.join(""));
// XXX: Sanitise the code by checking for references to globals // XXX: Sanitise the code by checking for references to globals, stripping out eval()
// Recompile the code // Recompile the code
var compiledCode = uglify.uglify.gen_code(tree); var compiledCode = uglify.uglify.gen_code(tree);
// Execute it // Execute it