From 189c26aa25fa995a57e682c4bb64d83fa0c1d28a Mon Sep 17 00:00:00 2001 From: Sugar Date: Thu, 30 May 2024 16:01:29 +0200 Subject: [PATCH] escape \ character in sqlLikeEscape --- packages/backend/src/misc/sql-like-escape.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/misc/sql-like-escape.ts b/packages/backend/src/misc/sql-like-escape.ts index 0c05255674..ffe61670ee 100644 --- a/packages/backend/src/misc/sql-like-escape.ts +++ b/packages/backend/src/misc/sql-like-escape.ts @@ -4,5 +4,5 @@ */ export function sqlLikeEscape(s: string) { - return s.replace(/([%_])/g, '\\$1'); + return s.replace(/([%_\\])/g, '\\$1'); }