What it flags
Areplace or replaceAll call on a string that escapes markup, quote or delimiter characters incompletely:
replacewith a one-character string pattern or a regex without thegflag, such ashtml.replace('<', '<')orname.replace('"', '\\"'). Only the first match is escaped.- A backslash escape of a delimiter, such as
cell.replaceAll('|', '\\|')ors.replace(/"/g, '\\"'), where the receiver does not come from a chain or a local assignment that first escapes backslashes.
JSON.stringify when it takes only that input. It also skips return values from a local named replacer whose only uses pass it as the replacer to the built-in JSON.stringify.
The check carries earlier escape evidence through a built-in array map only when a direct callback returns its sole parameter unchanged.
How to review or fix
UsereplaceAll or a regex with the g flag. Escape backslashes before the delimiter, for example text.replaceAll('\\', '\\\\').replaceAll('|', '\\|'), or use the target format’s own escaping function (JSON.stringify, an HTML escaper, a parameterized query).
Configuration
Set the rule to"off" in loadwise.config.json to drop its findings: