Skip to content

Commit

Permalink
Fix encoded # in path parameter causes route to be evaluated differently
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenLi committed Sep 11, 2024
1 parent 7372aff commit 434c290
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,4 @@
- yuleicul
- zeromask1337
- zheng-chuang
- dunnai
6 changes: 5 additions & 1 deletion packages/router/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,11 @@ export function decodePath(value: string) {
try {
return value
.split("/")
.map((v) => decodeURIComponent(v).replace(/\//g, "%2F"))
.map(
(v) => decodeURIComponent(v)
.replace(/\//g, "%2F")
.replace(/#/g, "%23")
)
.join("/");
} catch (error) {
warning(
Expand Down

0 comments on commit 434c290

Please sign in to comment.