Skip to content

[Bug]: Windows Markdown paths with spaces and ampersands lose separators #36579

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

packages/contracts or packages/shared

Steps to reproduce

Have an agent reply in web or desktop chat with:

![shot](<C:\R&D folder\.t3\shot.png>)

The same failure occurs with R&amp;D folder and with link/reference-definition destinations. Deterministic parser repro: parse that Markdown with unified().use(remarkParse).use(remarkKeepWindowsPaths) and inspect the image URL.

Expected behavior

The destination is C:\R&D folder\.t3\shot.png: separators survive and &amp; decodes normally.

Actual behavior

The parsed destination is C:\R&D folder.t3\shot.png. The separator before .t3 disappears, so image preview requests the wrong file and links open the wrong path.

Impact

Minor bug or occasional failure

Version or commit

Reproduced on pingdotgg/main @ bf9b8b7.

Environment

Shared Markdown parser used by web and desktop; reproduced deterministically on Linux with Windows path input. Independent Claude Opus 5.5 bughunt verifier confirmed the parser and full web image-source pipeline. Mobile already protected the original case.

Logs or stack traces

Expected: C:\R&D folder\.t3\shot.png
Received: C:\R&D folder.t3\shot.png

Screenshots, recordings, or supporting files

Parser red/green proof is included in the accompanying fix PR. No Windows-hosted visual proof.

Workaround

Use forward slashes in the Windows destination.

Related closed issue: #14261 fixed the earlier general Windows escaping problem; this report concerns the remaining combination of spaces and ampersands.

Activity

  1. added
    vouch:trusted
    on Nov 14, 2026
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

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions