Skip to content

Match cause is 'stay' when entering a path with encoded URI #3660

Description

@FrodoLuo

Which project does this relate to?

Router

Describe the bug

Hi tanstack

I encountered this issue that when there is encoded URI part (like %20, %21) in the $param, the match.cause will be stay when entering the route.

Please let me know if this was an intended design or is this incorrect usage?

I've pasted an URL to a minimal reproducible setup in codesandbox, please have a check.
You can add a hello%20world in the pathname to see this issue.

Versions:

{
    "@tanstack/react-router": "^1.112.13",
    "react": "^19.0.0",
    "react-dom": "^19.0.0"
}

Your Example Website or App

https://codesandbox.io/p/sandbox/637pwn?welcomeVSCode=true

Steps to Reproduce the Bug or Issue

  1. Define a route as /somepath/$param
  2. Go to the route with an encoded URI part in the pathname, e.g. /somepath/hello%20world
  3. The cause of match is stay which I think should be enter

Expected behavior

The cause should be enter

Screenshots or Videos

No response

Platform

  • Browser: [ Edge ]
  • Version: [ 1.112.13 ]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions