Skip to content

Commit

Permalink
Fix code scanning alert no. 12: Useless regular-expression character …
Browse files Browse the repository at this point in the history
…escape

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
ronknight and github-advanced-security[bot] authored Nov 25, 2024
1 parent 160b5aa commit ba22c06
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 ba22c06

Please sign in to comment.