Skip to content

Commit

Permalink
fix: sql escape
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Apr 15, 2023
1 parent 1aeea7c commit dc42d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cli.command('team', 'Generate team sql').action(async (option) => {
cli.run(process.argv.slice(2)).catch((err) => console.error(err));

function escape(text: string) {
return text.replace(/'/g, `\\'`);
return text.replace(/\\/g, '\\\\').replace(/'/g, `\\'`);
}

async function readResources(root = 'chunk') {
Expand Down

0 comments on commit dc42d2b

Please sign in to comment.