Skip to content

Commit

Permalink
[8.x] added '\' escapes (#199185) (#199373)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [added '\' escapes
(#199185)](#199185)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Bryce
Buchanan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T19:02:41Z","message":"added
'\\' escapes (#199185)\n\n## Summary\r\n\r\nThis PR adds backslash
escaping to previous code scan
fixes.","sha":"fb7114222b5bde5846fdda85a2ae0e94797600e2","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.15.4","v7.17.26"],"number":199185,"url":"https://github.com/elastic/kibana/pull/199185","mergeCommit":{"message":"added
'\\' escapes (#199185)\n\n## Summary\r\n\r\nThis PR adds backslash
escaping to previous code scan
fixes.","sha":"fb7114222b5bde5846fdda85a2ae0e94797600e2"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199185","number":199185,"mergeCommit":{"message":"added
'\\' escapes (#199185)\n\n## Summary\r\n\r\nThis PR adds backslash
escaping to previous code scan
fixes.","sha":"fb7114222b5bde5846fdda85a2ae0e94797600e2"}},{"branch":"8.15","label":"v8.15.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"7.17","label":"v7.17.26","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/199213","number":199213,"state":"MERGED","mergeCommit":{"sha":"83ca0265b5d9a0e11dd8092c7f9ab76c0df00d56","message":"[7.17]
added &#x27;\\&#x27; escapes (#199185) (#199213)\n\n# Backport\n\nThis
will backport the following commits from `main` to `7.17`:\n- [added
&#x27;\\&#x27;
escapes\n(#199185)](https://github.com/elastic/kibana/pull/199185)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Bryce\nBuchanan\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-11-06T19:02:41Z\",\"message\":\"added\n'\\\\'
escapes (#199185)\\n\\n## Summary\\r\\n\\r\\nThis PR adds
backslash\nescaping to previous code
scan\nfixes.\",\"sha\":\"fb7114222b5bde5846fdda85a2ae0e94797600e2\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"ci:project-deploy-observability\",\"Team:obs-ux-infra_services\",\"backport:version\",\"v8.15.4\",\"v7.17.26\"],\"title\":\"added\n'\\\\'\nescapes\",\"number\":199185,\"url\":\"https://github.com/elastic/kibana/pull/199185\",\"mergeCommit\":{\"message\":\"added\n'\\\\'
escapes (#199185)\\n\\n## Summary\\r\\n\\r\\nThis PR adds
backslash\nescaping to previous code
scan\nfixes.\",\"sha\":\"fb7114222b5bde5846fdda85a2ae0e94797600e2\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.15\",\"7.17\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/199185\",\"number\":199185,\"mergeCommit\":{\"message\":\"added\n'\\\\'
escapes (#199185)\\n\\n## Summary\\r\\n\\r\\nThis PR adds
backslash\nescaping to previous code
scan\nfixes.\",\"sha\":\"fb7114222b5bde5846fdda85a2ae0e94797600e2\"}},{\"branch\":\"8.15\",\"label\":\"v8.15.4\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"7.17\",\"label\":\"v7.17.26\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Bryce Buchanan <[email protected]>"}}]}]
BACKPORT-->

Co-authored-by: Larry Gregory <[email protected]>
  • Loading branch information
bryce-b and legrego authored Nov 21, 2024
1 parent 8df5ece commit b09e1fd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const createFilterFromOptions = (
filters.push(options.filterQuery);
}
if (options.groupBy) {
const id = series.id.replace('"', '\\"');
const id = series.id.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
const groupByFilters = Array.isArray(options.groupBy)
? options.groupBy
.map((field, index) => {
Expand Down

0 comments on commit b09e1fd

Please sign in to comment.