mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-05-20 20:56:56 +00:00
* Fix code scanning alert no. 28: Incomplete string escaping or encoding (MisskeyIO#800)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
(cherry picked from commit 443335c662b14f609d6a81a8f3807e95709aebc1)
* ✌️
---------
Co-authored-by: あわわわとーにゅ <17376330+u1-liquid@users.noreply.github.com>
8 lines
189 B
TypeScript
8 lines
189 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
export function sqlLikeEscape(s: string) {
|
|
return s.replace(/([\\%_])/g, '\\$1');
|
|
}
|