diff --git a/routes/weather.js b/routes/weather.js index 6207aaa..b38a7d5 100755 --- a/routes/weather.js +++ b/routes/weather.js @@ -42,7 +42,7 @@ function resolveCoordinates( location, callback ) { function getWeatherUndergroundData( location, weatherUndergroundKey, callback ) { // Generate URL using Weather Underground yesterday conditions - var url = "http://api.wunderground.com/api/" + weatherUndergroundKey + + var url = "http://api.wunderground.com/api/" + encodeURIComponent( weatherUndergroundKey ) + "/yesterday/conditions/astronomy/q/" + encodeURIComponent( location ) + ".json"; // Perform the HTTP request to retrieve the weather data