Firefox trunk no longer supports calling RegExp, properly use test and exec

This commit is contained in:
j 2011-03-30 19:38:39 +02:00
parent 5f325ae276
commit d43f732a2c

View file

@ -3262,7 +3262,7 @@ requires
function autovalidateFunction(value) {
var regexp = new RegExp(self.options.autovalidate);
return $.map(value.split(''), function(v) {
return regexp(v) ? v : null;
return regexp.test(v) ? v : null;
}).join('');
}
@ -3350,7 +3350,7 @@ requires
function autovalidateFunction(value) {
var length = value.length;
return $.map(value.toLowerCase().split(''), function(v, i) {
if (new RegExp(self.options.autocorrect)(v)) {
if (new RegExp(self.options.autocorrect).test(v)) {
return v;
} else {
return null;
@ -5803,7 +5803,7 @@ requires
function autocorrect(value) {
var length = value.length;
return $.map(value.toLowerCase().split(''), function(v, i) {
if (new RegExp(self.options.autocorrect)(v)) {
if (new RegExp(self.options.autocorrect).test(v)) {
return v
} else {
return null;