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

131
Views
external link getting appended with localhost url

I'm trying to redirect users to external links but the following code is always

<a href={`"https://"${posts.ctaURL1}`}

redirecting users to http://localhost:8080/%22https://%22www.fb.com

The external link won't be necessary https it can be http as well and url is dynamically filled. How to solve this issue?

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

0

It seems that posts.ctaURL1 also contains https, so that's why you get such a strange url. You could try

<a href={posts.ctaURL1}>click here</a>

If you want to replace https with http you can use string replace.

let url = posts.ctaURL1.replace("https", "http")
<a href={url}>click here</a>
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!