From 4e8a351526f65f9ec0b90af3ea9a363251170093 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Fri, 24 Dec 2021 23:29:01 -0800 Subject: [PATCH] Correct replace to replaceAll replace will only replace the first value. --- Code.gs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code.gs b/Code.gs index 22e5706..14dbbf8 100644 --- a/Code.gs +++ b/Code.gs @@ -77,7 +77,7 @@ function generateDatabaseQuery() { values += `'${data.toISOString()}',`; } else { - values += `'${data.replace(/'/g, "''")}',`; // Escape apostrophe with double apostrophe + values += `'${data.replaceAll(/'/g, "''")}',`; // Escape apostrophe with double apostrophe } break; case 'NULL': -- 2.47.3