From 6ad1ec436c381f31c2c990a45df28f1eba825c45 Mon Sep 17 00:00:00 2001 From: Andrew Nagy Date: Tue, 16 Sep 2014 10:32:45 -0700 Subject: [PATCH] Remove all non-ascii code from external sources Remove all non-ascii code from external sources --- lib/exe.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/exe.js b/lib/exe.js index d0b3a2c..17c519b 100644 --- a/lib/exe.js +++ b/lib/exe.js @@ -54,6 +54,8 @@ exports.compile = function (options, complete) { bundlePath = path.join(nodeCompiler.dir, "lib", "nexe.js"); _log("bundle -> %s", bundlePath); + //Remove all non-ascii code from sources + source = source.replace(/[^\x00-\x7F]/g, ""); // same path as all the other JS files fs.writeFile(bundlePath, source, next); },