(partially) cherry-picked from misskey/10e526b

fix: Escape SQL LIKE

* SQL LIKE escape

* CHANGELOG
This commit is contained in:
MeiMei 2023-01-08 20:32:17 +09:00 committed by naskya
parent b3fff542ba
commit a23b4a4b36

View File

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