Skip to content

Commit

Permalink
Merge pull request #57 from ronknight/alert-autofix-12
Browse files Browse the repository at this point in the history
Fix code scanning alert no. 12: Useless regular-expression character escape
  • Loading branch information
ronknight authored Nov 25, 2024
2 parents 160b5aa + ba22c06 commit 8c758a6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Optional extensions on the jquery.inputmask base
regex: {
number: function (opts) {
var escapedGroupSeparator = $.inputmask.escapeRegex.call(this, opts.groupSeparator);
var signedExpression = opts.allowPlus || opts.allowMinus ? "[" + (opts.allowPlus ? "\+" : "") + (opts.allowMinus ? "-" : "") + "]?" : "";
var signedExpression = opts.allowPlus || opts.allowMinus ? "[" + (opts.allowPlus ? "+" : "") + (opts.allowMinus ? "-" : "") + "]?" : "";
return new RegExp("^" + signedExpression + "(\\d+|\\d{1," + opts.groupSize + "}((" + escapedGroupSeparator + "\\d{" + opts.groupSize + "})?)+)$");
}
},
Expand Down

0 comments on commit 8c758a6

Please sign in to comment.