Skip to content

Commit

Permalink
[Canvas] Fix unescaped backslashes (elastic#196311)
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 ceea2ce commit 7217b51
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,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 7217b51

Please sign in to comment.