Skip to content

Commit 443335c

Browse files
Fix code scanning alert no. 28: Incomplete string escaping or encoding (#800)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 729ad19 commit 443335c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/backend/src/misc/sql-like-escape.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
*/
55

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

0 commit comments

Comments
 (0)