escape \ character in sqlLikeEscape

This commit is contained in:
Sugar 2024-05-30 16:01:29 +02:00
parent da764d3541
commit 189c26aa25

View file

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