diff options
author | Einar Egilsson | 2009-10-19 09:56:04 +0000 |
---|---|---|
committer | Einar Egilsson | 2009-10-19 09:56:04 +0000 |
commit | 7b4c3a2cdbc0f5ac9d237f91164ee8fea8210095 (patch) | |
tree | 4c7f8e7b87b08bd6a0e219a6786cbda91b79e6c9 /chrome/content/code/redirect.js | |
parent | 0973b58a596cce626e9ace2752d390fbc11a1067 (diff) |
Check for loop redirects implemented
git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@280 119bf307-c92d-0410-89bd-8f53e6181181
Diffstat (limited to 'chrome/content/code/redirect.js')
-rw-r--r-- | chrome/content/code/redirect.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/content/code/redirect.js b/chrome/content/code/redirect.js index 02e975d..7016715 100644 --- a/chrome/content/code/redirect.js +++ b/chrome/content/code/redirect.js @@ -163,11 +163,14 @@ Redirect.prototype = { for (var i = 1; i < matches.length; i++) {
resultUrl = resultUrl.replace(new RegExp('\\$' + i, 'gi'), this.unescapeMatches ? unescape(matches[i]) : matches[i]);
}
+ this._rxInclude.lastIndex = 0;
return resultUrl;
},
_excludeMatch : function(url) {
- return !!(this._rxExclude && this._rxExclude.exec(url));
+ var shouldExclude = !!(this._rxExclude && this._rxExclude.exec(url));
+ this._rxExclude.lastIndex = 0;
+ return shouldExclude;
},
clone : function() {
|