Skip to content

Commit

Permalink
[8.x] [ES|QL] Fixes Incomplete string escaping or encoding error (#19…
Browse files Browse the repository at this point in the history
…3384) (#193432)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Fixes Incomplete string escaping or encoding error
(#193384)](#193384)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-19T14:07:44Z","message":"[ES|QL]
Fixes Incomplete string escaping or encoding error (#193384)\n\n##
Summary\r\n\r\nCloses
elastic/kibana-team#1087 think that
this change will close the second problem. Not 100% sure\r\nbut this is
how I interpret
it","sha":"88163b063a79520e1dafc7d9548f040a1323522b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL","v8.16.0"],"title":"[ES|QL]
Fixes Incomplete string escaping or encoding
error","number":193384,"url":"#193384
Fixes Incomplete string escaping or encoding error (#193384)\n\n##
Summary\r\n\r\nCloses
elastic/kibana-team#1087 think that
this change will close the second problem. Not 100% sure\r\nbut this is
how I interpret
it","sha":"88163b063a79520e1dafc7d9548f040a1323522b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"#193384
Fixes Incomplete string escaping or encoding error (#193384)\n\n##
Summary\r\n\r\nCloses
elastic/kibana-team#1087 think that
this change will close the second problem. Not 100% sure\r\nbut this is
how I interpret
it","sha":"88163b063a79520e1dafc7d9548f040a1323522b"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <[email protected]>
  • Loading branch information
kibanamachine and stratoula committed Sep 19, 2024
1 parent 6ce928a commit b0853ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/kbn-esql-utils/src/utils/append_to_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}\``;

Expand Down

0 comments on commit b0853ca

Please sign in to comment.