Skip to content
Snippets Groups Projects
Commit da945f3e authored by rswindell's avatar rswindell
Browse files

An example dynamic-HTML content (.xjs file) parser. Very basic.

parent 5722d056
Branches
Tags
No related merge requests found
/* Example Dynamic-HTML Content Parser */
/* $Id$ */
var file = new File(http_request.real_path);
if(!file.open("r")) {
writeln("!ERROR " + file.error + " opening " + http_request.real_path);
exit();
}
var text = file.readAll();
file.close();
write(text.join(" ").replace(/<%([^%]*)%>/g, function (str, arg) { return eval(arg); } ));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment