From 88163b063a79520e1dafc7d9548f040a1323522b Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Thu, 19 Sep 2024 16:07:44 +0200 Subject: [PATCH] [ES|QL] Fixes Incomplete string escaping or encoding error (#193384) ## Summary Closes https://github.com/elastic/kibana-team/issues/1087 I think that this change will close the second problem. Not 100% sure but this is how I interpret it --- packages/kbn-esql-utils/src/utils/append_to_query.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-esql-utils/src/utils/append_to_query.ts b/packages/kbn-esql-utils/src/utils/append_to_query.ts index 76f317d55aa5d..f4161be073a8d 100644 --- a/packages/kbn-esql-utils/src/utils/append_to_query.ts +++ b/packages/kbn-esql-utils/src/utils/append_to_query.ts @@ -36,7 +36,7 @@ export function appendWhereClauseToESQLQuery( default: operator = '=='; } - let filterValue = typeof value === 'string' ? `"${value.replace(/"/g, '\\"')}"` : value; + let filterValue = typeof value === 'string' ? `"${value.replace(/\"/g, '\\"')}"` : value; // Adding the backticks here are they are needed for special char fields let fieldName = `\`${field}\``;