Skip to content

Platform links lose their anchor when no platform is selected #20226

Description

@RaphaelFakhri

When no platform is active, PlatformLink points to /platform-redirect/?next=<encoded path>. If the target has an anchor, the # is encoded as %23 inside next. sanitizeNext in app/platform-redirect/utils.ts keeps only the path, so the redirect and the links on the platform selection page drop the anchor.

Steps to reproduce

  1. Open https://docs.sentry.io/get-started/guides/issues-errors/ without a selected platform.
  2. Select the ignoreErrors link. Its URL is /platform-redirect/?next=%2Fconfiguration%2Foptions%2F%23ignoreErrors.
  3. Select a platform.

Or with curl:

curl -sI 'https://docs.sentry.io/platform-redirect/?next=/configuration/options/%23tracing-options&platform=python'

Expected result

The page opens at the ignoreErrors option (#ignoreErrors), and the redirect location ends with #tracing-options.

Actual result

The page opens at the top of Options, and the redirect location is /platforms/python//configuration/options/ with no fragment.

About 900 PlatformLink uses in the docs have an anchor.

Activity

  1. linear-code commented on Oct 24, 2026

    @linear-code
  2. added a commit that references this issue on Oct 26, 2026
    571b0b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions