File references containing % characters cause 400 Bad Request URI Error #1657

Closed
opened 2026-02-16 17:31:59 -05:00 by yindo · 1 comment
Owner

Originally created by @ChaseRensberger on GitHub (Sep 8, 2025).

I noticed this error when working on an application that uses tanstack router where you make slug routes with the % symbol.

Pretty sure the issue occurs in the file reference processing pipeline since when decodeURIComponent(url.pathname) is called, % is considered an escape character and needs to be followed by some hex characters.

Originally created by @ChaseRensberger on GitHub (Sep 8, 2025). I noticed this error when working on an application that uses [tanstack router](https://tanstack.com/router/latest/docs/framework/react/routing/file-based-routing) where you make slug routes with the % symbol. Pretty sure the issue occurs in the file reference processing pipeline since when `decodeURIComponent(url.pathname)` is called, `%` is considered an escape character and needs to be followed by some hex characters.
yindo closed this issue 2026-02-16 17:31:59 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 8, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #787: Both issues describe the same problem with percent-encoded characters in file paths causing 400 Bad Request URI errors due to improper handling of URL decoding with decodeURIComponent

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Sep 8, 2025): This issue might be a duplicate of existing issues. Please check: - #787: Both issues describe the same problem with percent-encoded characters in file paths causing 400 Bad Request URI errors due to improper handling of URL decoding with decodeURIComponent Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1657