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

184
Views
how to get url's dynamic title http://localhost:4300/title/örange which contain ö

I am getting data from backend using URL and my URL is

http://localhost:4300/title/örange

the title of blog i am showing in URL and one of my user give title like this => my-örange and when i am fetching title from URL i am getting title as my-%C3%B6range i am getting title in react as this

let { title } = this.props.match.params;
console.log(title) // output => my-%C3%B6rang
//i want output my-örange

so how to get same string?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You should use decodeURIComponent(). Read more on it here. Example:

let { title } = decodeURIComponent(this.props.match.params);
console.log(title) // output => my-örange
about 4 years ago · Juan Pablo Isaza Report

0

You can use react-router useParams instead (from version v5.1):

import { useParams } from "react-router-dom"
const params = useParams()
console.log(params.title)

the route:

 <Route path="blog/:title" element={<Blog />} />

and the URL should be http://localhost:4300/blog/örange

about 4 years ago · Juan Pablo Isaza Report
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!