Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperlinks in Slack messages are broken when there is "_" or "*" in the URL #165673

Closed
ersin-erdal opened this issue Sep 5, 2023 · 5 comments · Fixed by #170067
Closed

Hyperlinks in Slack messages are broken when there is "_" or "*" in the URL #165673

ersin-erdal opened this issue Sep 5, 2023 · 5 comments · Fixed by #170067
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@ersin-erdal
Copy link
Contributor

ersin-erdal commented Sep 5, 2023

escapeSlack function in the mustasche_renderer breakes the hyperlinks by wrapping the URL with backticks.
So the below markdown template does not work.

<{{context.alertDetailsUrl}}|View alert details>

@ersin-erdal ersin-erdal converted this from a draft issue Sep 5, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 5, 2023
@ersin-erdal ersin-erdal added bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed needs-team Issues missing a team label labels Sep 5, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@ersin-erdal ersin-erdal changed the title Hyperlinks in Slack messages are broken when there is "_" or "*" in the link Hyperlinks in Slack messages are broken when there is "_" or "*" in the URL Sep 5, 2023
@mikecote mikecote moved this from Awaiting Triage to Todo in AppEx: ResponseOps - Execution & Connectors Sep 7, 2023
@mikecote
Copy link
Contributor

mikecote commented Sep 7, 2023

cc @shanisagiv1 internal feedback

@katrin-freihofner
Copy link
Contributor

Any plans on when we will be able to pick this up?

@mikecote
Copy link
Contributor

Any plans on when we will be able to pick this up?

@katrin-freihofner I'm going to add this to 8.12 candidates 👍 cc @shanisagiv1

@maryam-saeidi
Copy link
Member

Sometimes this issue does not happen, as you can see here.

@doakalexi doakalexi self-assigned this Oct 24, 2023
@doakalexi doakalexi moved this from Todo to In Progress in AppEx: ResponseOps - Execution & Connectors Oct 24, 2023
@doakalexi doakalexi moved this from In Progress to In Review in AppEx: ResponseOps - Execution & Connectors Oct 27, 2023
@doakalexi doakalexi moved this from In Review to In Progress in AppEx: ResponseOps - Execution & Connectors Oct 27, 2023
@doakalexi doakalexi moved this from In Progress to In Review in AppEx: ResponseOps - Execution & Connectors Oct 27, 2023
doakalexi added a commit that referenced this issue Oct 30, 2023
…_" or "*" in the URL (#170067)

Resolves #165673

## Summary
`escapeSlack` function in the mustasche_renderer breakes the hyperlinks
by wrapping the URL with backticks.
So the below markdown template does not work.

`<{{context.alertDetailsUrl}}|View alert details>`

This PR removes the code that adds backticks. 
With this change action variables with text wrapped in asterisks
\*text\* will render as **text** or wrapped in underscores \_text\_ will
render as _text_ .


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios


### To verify

- Create a slack connector
- Create a rule that uses a slack connector and use the above markdown
template
- Verify that hyperlink is working properly in slack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
6 participants