Skip to content

Commit

Permalink
Fix code scanning alert no. 28: Incomplete string escaping or encoding (
Browse files Browse the repository at this point in the history
MisskeyIO#800)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 729ad19 commit 443335c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/misc/sql-like-escape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
*/

export function sqlLikeEscape(s: string) {
return s.replace(/([%_])/g, '\\$1');
return s.replace(/([\\%_])/g, '\\$1');
}

0 comments on commit 443335c

Please sign in to comment.