Slack notifications: feedback issue titles containing newlines render as raw mrkdwn instead of a link
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 23m
- Merged PRs (30d)
- 607
Description
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
-
Install the Slack integration and add an issue alert that posts new User Feedback issues to a Slack channel.
-
Submit user feedback whose message contains line breaks. For example, via the Android SDK:
Sentry.feedback().capture(Feedback("the app freezes on checkout\n\nreproduced twice")) -
Open the resulting Slack notification.
Expected Result
The notification renders a clickable link to the feedback, the same as it does when the feedback message is a single line.
Actual Result
The link prints as literal mrkdwn text, and nothing in the message is clickable:
<https://<org>.sentry.io/feedback/?referrer=slack¬ification_uid=…&workflow_id=…&alert_type=issue&feedbackSlug=…&project=…|*User Feedback: the app freezes on checkout
reproduced twice*>
Cause: Sentry titles a feedback issue User Feedback: <message verbatim>, so any newline the reporter typed becomes part of the issue title. The Slack message builder then interpolates that title into mrkdwn link syntax (<url|*title*>), and Slack only parses that syntax when the label sits on a single line. Feedback submitted as one line is unaffected, so this only shows up for multiline reports.
Suggested fix: sanitize the link label when building the Slack message, by collapsing or escaping newlines, or by truncating the title to its first line.
Possibly related: getsentry/sentry#109694, where bold formatting inside a link breaks rendering on Slack mobile. Both originate from the same <url|*title*> pattern in the Slack message builders.
Product Area
Alerts
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Slack message builders that interpolate the <url|*title*> pattern, then trace how feedback issue titles enter that label. Reproduce the case with a multiline feedback message and verify that the resulting notification renders a clickable feedback link while single-line feedback remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100