Firefox trunk no longer supports calling RegExp, properly use test and exec
This commit is contained in:
parent
5f325ae276
commit
d43f732a2c
1 changed files with 3 additions and 3 deletions
|
@ -3262,7 +3262,7 @@ requires
|
||||||
function autovalidateFunction(value) {
|
function autovalidateFunction(value) {
|
||||||
var regexp = new RegExp(self.options.autovalidate);
|
var regexp = new RegExp(self.options.autovalidate);
|
||||||
return $.map(value.split(''), function(v) {
|
return $.map(value.split(''), function(v) {
|
||||||
return regexp(v) ? v : null;
|
return regexp.test(v) ? v : null;
|
||||||
}).join('');
|
}).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3350,7 +3350,7 @@ requires
|
||||||
function autovalidateFunction(value) {
|
function autovalidateFunction(value) {
|
||||||
var length = value.length;
|
var length = value.length;
|
||||||
return $.map(value.toLowerCase().split(''), function(v, i) {
|
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;
|
return v;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -5803,7 +5803,7 @@ requires
|
||||||
function autocorrect(value) {
|
function autocorrect(value) {
|
||||||
var length = value.length;
|
var length = value.length;
|
||||||
return $.map(value.toLowerCase().split(''), function(v, i) {
|
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
|
return v
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue