diff options
Diffstat (limited to 'lib/strfry.ts')
| -rw-r--r-- | lib/strfry.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/strfry.ts b/lib/strfry.ts index 926ca429..65b77709 100644 --- a/lib/strfry.ts +++ b/lib/strfry.ts @@ -72,7 +72,10 @@ const exec = async (cmd: string, data = ""): Promise<Event[]> => // return r; // }; -export const load = (data) => exec(`echo '${data}' | /app/strfry import --no-verify\n`); +export const load = (data) => + exec( + `echo '${data.replace(/'/g, "'\\''")}' | /app/strfry import --no-verify\n`, + ); export const count = (f) => exec(`/app/strfry scan --count '${JSON.stringify(f)}'\n`); export const scan = (f) => exec(`/app/strfry scan '${JSON.stringify(f)}'\n`); |
