From 9fc85871c87a3c7f673b76098cb1b7c4d8d396b7 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 19 Oct 2008 08:01:09 +0000 Subject: [PATCH] fix typo in parseArgs#quoteArg --- content/commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/commands.js b/content/commands.js index e4193509..b9930152 100644 --- a/content/commands.js +++ b/content/commands.js @@ -355,12 +355,12 @@ function Commands() //{{{ switch (quote) { case "'": - return function (str) "'" + str.substitute(/[\\']/g, "\\$&") + "'"; + return function (str) "'" + str.replace(/[\\']/g, "\\$&") + "'"; case '"': - return function (str) '"' + str.substitute(/[\\"\t\n]/g, + return function (str) '"' + str.replace(/[\\"\t\n]/g, function (c) (c == "\n" ? "\\n" : c == "\t" ? "\\t" : "\\" + c)); default: - return function (str) str.substitute(/[\\ ]/g, "\\$&"); + return function (str) str.replace(/[\\ ]/g, "\\$&"); } }