Skip to content

Props search params swallows + signs #85707

@KilianB

Description

@KilianB

Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template

To Reproduce

When serializing a protobuffer to a base64 encoded query string the + sign gets dropped when working with the props.searchParams.

import { useRouter, useSearchParams } from 'next/navigation';


const { push } = useRouter();

 push(`/?q=Some+Value`, {
        scroll: true,
 });
export default async function Other{props}{
  const searchParams = await props.searchParams;

  console.log(searchParams.q);
 /// "Some Value" The + sign is missing

}

Current vs. Expected behavior

The + sign is not replaced by a + sign when accessing the props search params.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:43 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8132
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 24.0.1
  npm: 11.5.2
  Yarn: N/A
  pnpm: 10.11.1
Relevant Packages:
  next: 15.5.6
  eslint-config-next: 15.5.6
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Linking and Navigating

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

Please check this MSDN article about preserving + signs. https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams#preserving_plus_signs
This happens on local dev.

Maybe related: #54702

Metadata

Metadata

Assignees

No one assigned

    Labels

    Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions