Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] [Security assistant] Fixes errors when creating c…
…onversations with special characters in the title (elastic#197319) ### [Security Solution] [Security assistant] Fixes errors when creating conversations with special characters in the title This PR fixes an [issue](elastic/security-team#10284) in the security assistant where attempting to create conversations with special characters in the title, i.e. a `:`, resulted in an `Error creating conversation with title...` toaster. ### Desk testing To reproduce, simulate generation of a title with special characters: 1) Edit `x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts` change the following line: from ```ts const lastFive = attackDiscovery.id ? ` - ${attackDiscovery.id.slice(-5)}` : ''; ``` to ```ts const lastFive = attackDiscovery.id ? ` - test: "${attackDiscovery.id.slice(-5)}"` : ''; ``` 2) Navigate to Security > Attack discovery 3) Click the `View in AI Assistant` link for any attack discovery **Expected result** - The assistant flyout opens without errors **Actual result** - The assistant flyout opens with a toaster error like the following example: ``` Error creating conversation with title Sophisticated Multi-Stage Attack Detected - test: "7a882" ```
- Loading branch information