Skip to content

Encode file paths when loading files in the source browser - #475

Merged
andrew merged 1 commit into
mainfrom
fix/browse-encode-file-path
Oct 14, 2026
Merged

andrew merged 1 commit into
mainfrom
fix/browse-encode-file-path

Conversation

@andrew

@andrew andrew commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

loadFile in the source browser built /ui/api/browse/.../file/${path} without encoding the path, so a file named a#b.txt requested .../file/src/a and showed "Error loading file". Each segment is now passed through encodeURIComponent. The browse endpoint already decodes encoded segments; the new test pins that for #, ?, % and spaces.

loadFile put the archive path into the URL as-is, so a file name
containing # or ? was cut short and failed to load.
Copilot AI balanced review requested due to automatic review settings October 14, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@andrew
andrew merged commit 18f6587 into main Oct 14, 2026
10 checks passed
@andrew
andrew deleted the fix/browse-encode-file-path branch October 14, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants