From 1707d995aea53f86f4420707815e2e4f1e0fe345 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 11 Aug 2006 21:46:41 +0000
Subject: [PATCH] Move the definition of escape_quotes into the xjs_load()
 function itself to keep the global namespace clean.

---
 exec/xjs_handler.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/exec/xjs_handler.js b/exec/xjs_handler.js
index 12f9d4e24c..3ee8be36c2 100644
--- a/exec/xjs_handler.js
+++ b/exec/xjs_handler.js
@@ -95,8 +95,9 @@ function xjs_load(filename) {
 
 	load(ssjs_filename);
 	cwd=old_cwd;
-}
 
-function escape_quotes(arg) {
-	return("'"+arg.replace(/'/g,"'+"+'"'+"'"+'"+'+"'")+"'");
+	function escape_quotes(arg) {
+		return("'"+arg.replace(/'/g,"'+"+'"'+"'"+'"+'+"'")+"'");
+	}
 }
+
-- 
GitLab