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: #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
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:
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:
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: #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