Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
Special character "?" is converted to unicode when set in location pathname

I have an issue where I set the window's path to '/payment/success?username=the+users+name' by using the following code:

window.location.pathname = `/payment/success?userName=the+users+name}`;

The issue is, that the page reloads, the actual path turns out to be:

/payment/success/account-created%3FuserName=the+users+name

For some reason, either JS or the browser is converting my "?" into "%3F", and I can't parse the paramater set in the url.

How can I stop it from encoding the special character?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!