mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
add support for String.prototype.replaceAll
This commit is contained in:
@@ -70,7 +70,7 @@ predicate regExpMatchesString(RegExpTerm t, string s) {
|
||||
|
||||
from MethodCallExpr repl, string s, string friendly
|
||||
where
|
||||
repl.getMethodName() = "replace" and
|
||||
repl.getMethodName() = ["replace", "replaceAll"] and
|
||||
matchesString(repl.getArgument(0), s) and
|
||||
repl.getArgument(1).getStringValue() = s and
|
||||
(if s = "" then friendly = "the empty string" else friendly = "'" + s + "'")
|
||||
|
||||
Reference in New Issue
Block a user