From b0853caa12b6a792ff004080dca65632ffb69a12 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 20 Sep 2024 02:04:18 +1000 Subject: [PATCH] [8.x] [ES|QL] Fixes Incomplete string escaping or encoding error (#193384) (#193432) # Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Fixes Incomplete string escaping or encoding error (#193384)](https://github.com/elastic/kibana/pull/193384) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Stratoula Kalafateli --- 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 76f317d55aa5dc..f4161be073a8db 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}\``;