Skip to content

Commit

Permalink
[Canvas] Fix unescaped backslashes (#196321)
Browse files Browse the repository at this point in the history
Fixes unescaped backslashes in Canvas autocomplete
  • Loading branch information
nickpeihl authored Oct 15, 2024
1 parent de35da5 commit f7b8f9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/common/lib/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ function maybeQuote(value: any) {
if (value.match(/^\{.*\}$/)) {
return value;
}
return `"${value.replace(/"/g, '\\"')}"`;
return `"${value.replace(/[\\"]/g, '\\$&')}"`;
}
return value;
}
Expand Down

0 comments on commit f7b8f9b

Please sign in to comment.