1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-05 08:15:48 +01:00

Add missing metacharachters to regex.escape. Fixes key handling bug.

This commit is contained in:
Kris Maglione
2011-01-18 15:40:42 -05:00
parent c9549cbd73
commit 3e95b19cb0

View File

@@ -1278,7 +1278,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
* @param {string} str
* @returns {string}
*/
escape: function regexp_escape(str) str.replace(/([\\{}()[\].?*+])/g, "\\$1"),
escape: function regexp_escape(str) str.replace(/([\\{}()[\]^$.?*+|])/g, "\\$1"),
/**
* Given a RegExp, returns its source in the form showable to the user.