Skip to content

Commit

Permalink
fix: route matching for encoded pathnames (#9934)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Phillips <[email protected]>
  • Loading branch information
ktym4a and matthewp authored Feb 1, 2024
1 parent 9d2fdb2 commit b176825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/core/routing/match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export function matchRoute(pathname: string, manifest: ManifestData): RouteData

/** Finds all matching routes from pathname */
export function matchAllRoutes(pathname: string, manifest: ManifestData): RouteData[] {
return manifest.routes.filter((route) => route.pattern.test(pathname));
return manifest.routes.filter((route) => route.pattern.test(decodeURI(pathname)));
}

0 comments on commit b176825

Please sign in to comment.