Skip to content

Slack notifications: feedback issue titles containing newlines render as raw mrkdwn instead of a link #121520

Description

@yoonshikcape

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Install the Slack integration and add an issue alert that posts new User Feedback issues to a Slack channel.

  2. 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"))
  3. 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&notification_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

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions