Skip to content

Commit d8abb4c

Browse files
committed
[Graph] Escape backslash characters in the graph encode functions (#196239)
## Summary Escape backslash characters in the graph encode functions. (cherry picked from commit 57c4b40)
1 parent 872969f commit d8abb4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

x-pack/plugins/graph/public/helpers/kql_encoder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import rison from '@kbn/rison';
1010
import { Workspace } from '../types';
1111

1212
function escapeQuotes(str: string) {
13-
return str.replace(/"/g, '\\"');
13+
return str.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
1414
}
1515

1616
export function asKQL(workspace: Workspace, joinBy: 'and' | 'or') {

0 commit comments

Comments
 (0)