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

253
Vistas
When to use and when not to use encodeURIComponent or encodeURI?

In a security standpoint, when should I use encodeURIComponent or encodeURI and when I don't need to use it?

Do I need to use encodeURI on "https://nominatim.openstreetmap.org/search.php?q=" as shown below?

Do I need to encodeURIComponent each key in the query string, like polygon_geojson and format?


And do I need to use them on only GET or also on POST method? On another posted question, there were mixed answers.

$.get(
"https://nominatim.openstreetmap.org/search.php?q=" +
  encodeURIComponent(query) +
  "&polygon_geojson=1&format=jsonv2",
function (response) {
  if (response.length > 0) {
    var latlng = new L.LatLng(response[0].lat, response[0].lon);

    marker.setLatLng(latlng);
    map.panTo(latlng);
    acadp_update_latlng(response[0].lat, response[0].lon);
  }
},
"json"
);
about 4 years ago · Juan Pablo Isaza
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