This commit is contained in:
syuilo
2020-02-20 07:18:16 +09:00
parent 8e6207f3e9
commit 177e19632a
3 changed files with 9 additions and 4 deletions

3
src/misc/safe-for-sql.ts Normal file
View File

@ -0,0 +1,3 @@
export function safeForSql(text: string): boolean {
return /[\0\x08\x09\x1a\n\r"'\\\%]/g.test(text);
}