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

157
Views
What is the recommend way to encode forward slashs as a url param

I'm looking for some information on the best approach to url encode text client side before it's passed to an api call.

I have a text box that takes a word or multiple words from the user. A button is clicked which takes the text and passes it as a param into a api call.

If a user includes a slash in the text, such as desk / table this errors out as the forward slash isn't encoded and it essentially breaks the endpoint.

Example

https://www.example.com/search/desk%20/%20table

I wan't to encode the the forward clash so it's not seen as an additional path. Whats the correct way to do this. Would it be using encodeURIComponent.

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!