Skip to content

Commit

Permalink
[8.15] [Canvas] Fix unescaped backslashes (#196311) (#196428)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.15`:
- [[Canvas] Fix unescaped backslashes
(#196311)](#196311)

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

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

<!--BACKPORT [{"author":{"name":"Nick
Peihl","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-15T19:05:24Z","message":"[Canvas]
Fix unescaped backslashes (#196311)\n\nFixes unescaped backslashes in
Canvas
autocomplete","sha":"7217b51452a089b808142ade04da8dafb01c180b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","v9.0.0","backport:current-major","v7.17.25"],"title":"[Canvas]
Fix unescaped
backslashes","number":196311,"url":"https://github.com/elastic/kibana/pull/196311","mergeCommit":{"message":"[Canvas]
Fix unescaped backslashes (#196311)\n\nFixes unescaped backslashes in
Canvas
autocomplete","sha":"7217b51452a089b808142ade04da8dafb01c180b"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196311","number":196311,"mergeCommit":{"message":"[Canvas]
Fix unescaped backslashes (#196311)\n\nFixes unescaped backslashes in
Canvas
autocomplete","sha":"7217b51452a089b808142ade04da8dafb01c180b"}},{"branch":"7.17","label":"v7.17.25","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Nick Peihl <[email protected]>
  • Loading branch information
kibanamachine and nickpeihl authored Oct 15, 2024
1 parent 1a0a8c7 commit 50e9ea1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,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 50e9ea1

Please sign in to comment.