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 d935bd6
Showing 1 changed file with 5 additions and 1 deletion.
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 d935bd6

Please sign in to comment.