Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda