Skip to content

Params with spaces are processed incorrectly #4270

Open
@alegorn-github

Description

@alegorn-github

Which project does this relate to?

Router

Describe the bug

When using file route like '/$params' with params containing spaces it is processed incorrectly on first load.

  1. If there is a Link on page, it doesn't have [data-status=active] attribute
  2. beforeLoad function have been called twice

For params without spaces it works fine. Also it works fine when browsing app.

Your Example Website or App

https://codesandbox.io/p/devbox/cause-incorrect-with-encoded-uri-in-params-forked-l5x5n6?welcomeVSCode=true&workspaceId=ws_A5QKWMuyDKPRuaf3cPyVMJ

Steps to Reproduce the Bug or Issue

  1. Go to main page
  2. Click link 'a b c'
  3. Reload app

Expected behavior

  1. Link 'a b c' have a red border (there is [data-status=active] attribute)
  2. There is single message in console

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Chrome
  • Version: "@tanstack/react-router": "^1.120.11"

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions