Skip to content

External links are broken when docs are accessed via a versioned link #7046

Description

Describe the bug
External links are broken when docs pages are accessed via a versioned link to the docs.

E.g. on https://makecode.microbit.org/v9/coding-cards all external links are broken but on https://makecode.microbit.org/coding-cards they work.

The actual hrefs are nonsense on the versioned one, e.g. /v9https://drive.google.com/open?id=1Tl80unLA5_Zwkymh1flSbwuZbCIqSOxQ. The version part has been inappropriately prepended to an absolute URL.

This came up on a support request noting the links were broken (using a v2 link, unclear source, we will try to confirm).

Not a big deal as I think these links should be uncommon, but potentially a quick fix to not resolve external/absolute links at all, or use a resolution approach that skips absolute URLs (like the URL constructor).

Expected behavior
External links work as normal regardless of how the page is accessed.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions