summaryrefslogtreecommitdiff
path: root/common/content
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-03-02 14:43:57 -0500
committerKris Maglione <maglione.k@gmail.com>2011-03-02 14:43:57 -0500
commit66785a8b5f3e46212d803217dd23c7ece749fa80 (patch)
treeb1cb7b9d4df8a523a562784364fd679d09bb2624 /common/content
parent0f542bc000c63e3a783a4de56265a89f0f5c8b66 (diff)
downloadpentadactyl-66785a8b5f3e46212d803217dd23c7ece749fa80.tar.gz
Allow \c/\C in regexp options and so forth.
Diffstat (limited to 'common/content')
-rw-r--r--common/content/dactyl.js2
-rw-r--r--common/content/events.js6
-rw-r--r--common/content/hints.js4
3 files changed, 6 insertions, 6 deletions
diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index cfa484f8..45302e7a 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -1276,7 +1276,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
let urls;
if (options["urlseparator"])
- urls = util.splitLiteral(str, RegExp("\\s*" + options["urlseparator"] + "\\s*"));
+ urls = util.splitLiteral(str, util.regexp("\\s*" + options["urlseparator"] + "\\s*"));
else
urls = [str];
diff --git a/common/content/events.js b/common/content/events.js
index ef7a742a..86c908cf 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -300,6 +300,8 @@ var EventHive = Class("EventHive", Contexts.Hive, {
* @param {function} callback The function to call when the event is received.
* @param {boolean} capture When true, listen during the capture
* phase, otherwise during the bubbling phase.
+ * @param {boolean} allowUntrusted When true, allow capturing of
+ * untrusted events.
*/
listen: function (target, event, callback, capture, allowUntrusted) {
if (!isObject(event))
@@ -821,9 +823,7 @@ var Events = Module("events", {
unknownOk = true;
let out = [];
- let re = RegExp("<.*?>?>|[^<]|<(?!.*>)", "g");
- let match;
- while ((match = re.exec(input))) {
+ for (let match in util.regexp.iterate(/<.*?>?>|[^<]|<(?!.*>)/g, input)) {
let evt_str = match[0];
let evt_obj = { ctrlKey: false, shiftKey: false, altKey: false, metaKey: false,
keyCode: 0, charCode: 0, type: "keypress" };
diff --git a/common/content/hints.js b/common/content/hints.js
index 443f0f8e..5183e0a7 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -847,8 +847,8 @@ var Hints = Module("hints", {
* hints that match as above.
*/
function wordStartsWithMatcher(hintString, allowWordOverleaping) { //{{{
- let hintStrings = tokenize(/\s+/, hintString);
- let wordSplitRegexp = RegExp(options["wordseparators"]);
+ let hintStrings = tokenize(/\s+/, hintString);
+ let wordSplitRegexp = util.regexp(options["wordseparators"]);
/**
* Match a set of characters to the start of words.