1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-11 21:25:46 +01:00

Fix use of String#replace flags parameter.

It is deprecated. See https://bugzil.la/1142351.
This commit is contained in:
Doug Kearns
2015-05-26 00:10:13 +10:00
parent c0b7c4c35d
commit 34bfc2f50f
4 changed files with 4 additions and 4 deletions

View File

@@ -608,7 +608,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
escapeString: function escapeString(str, delimiter) {
if (delimiter == undefined)
delimiter = '"';
return delimiter + str.replace(/([\\'"])/g, "\\$1").replace("\n", "\\n", "g").replace("\t", "\\t", "g") + delimiter;
return delimiter + str.replace(/([\\'"])/g, "\\$1").replace(/\n/g, "\\n").replace(/\t/g, "\\t") + delimiter;
},
/**