Escape quotes in IN clause

This commit is contained in:
Chocobozzz 2024-01-15 10:20:58 +01:00
parent 3a180c1b3c
commit 535b2b6594
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -23,5 +23,5 @@ export function buildInQuery (term: string, values: string[] | number[]) {
} }
export function buildInValuesArray (values: string[] | number[]) { export function buildInValuesArray (values: string[] | number[]) {
return '[' + values.map(v => `'${v}'`).join(',') + ']' return '[' + values.map(v => `'${v.replace(/'/g, '\\\'')}'`).join(',') + ']'
} }