CICCIOSGAMINO / openweather-apis

Simple APIs for OpenWeatherMap.org basic services
GNU General Public License v3.0
44 stars 27 forks source link

City,CountryCode broken #28

Closed fcaza closed 4 years ago

fcaza commented 4 years ago

City,CountryCode is now broken try: weather.setCity('Roma,IT');

Actually, it didn't worked as well in 4.0.0 It's because of encodeURIComponent in setCity?

velsa commented 4 years ago

Looks like a real issue. E.g. if you have a city name with a space in it, space is translated into %2520 instead of %20

CICCIOSGAMINO commented 4 years ago

I'm working on ... i'll be solved in the v5.0.0 coming soon !!

knoguchi commented 4 years ago

The string is encoded twice. That's why ` encoded to%20and encoded again to%2520`

naofireblade commented 4 years ago

I created a PR to fix this.