mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
JS: Do not flag semi-anchored regexps in .replace()
This commit is contained in:
@@ -127,3 +127,7 @@
|
||||
/xxx_yyy=\w+|^$/;
|
||||
/^(?:mouse|contextmenu)|click/;
|
||||
});
|
||||
|
||||
function replaceTest(x) {
|
||||
return x.replace(/^a|b/, ''); // OK - possibly replacing too much, but not obviously a problem
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user