Skip to content

Commit

Permalink
Fix code scanning alert no. 2898: Inefficient regular expression
Browse files Browse the repository at this point in the history
aaaaah stop it already

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 1a60197 commit f2bf20d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4037,7 +4037,7 @@ Object.extend(Selector, {
},
split: function (b) {
var a = [];
b.scan(/(([\w#:.~>+()]+|[\t\n\r\f\v-]+|\*|\[[^\]]*?\])+)\s*(,|$)/, function (c) {
b.scan(/(([\w#:.~>+()]+|[\t\n\r\f\v-]*?|\*|\[[^\]]*?\])+)\s*(,|$)/, function (c) {

Check failure

Code scanning / CodeQL

Inefficient regular expression High documentation

This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '#'.

Check failure

Code scanning / CodeQL

Inefficient regular expression High documentation

This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '\t'.
a.push(c[1].strip());
});
return a;
Expand Down

0 comments on commit f2bf20d

Please sign in to comment.