lib/geocoder/lookups/bing.rb in geocoder-1.2.1 vs lib/geocoder/lookups/bing.rb in geocoder-1.2.2

- old
+ new

@@ -25,10 +25,12 @@ def base_url(query) url = "#{protocol}://dev.virtualearth.net/REST/v1/Locations" if !query.reverse_geocode? and r = query.options[:region] url << "/#{r}" end - url + "/" + URI.escape(query.sanitized_text.strip) + "?" + # use the more forgiving 'unstructured' query format to allow special + # chars, newlines, brackets, typos. + url + "?q=" + URI.escape(query.sanitized_text.strip) + "&" end def results(query) return [] unless doc = fetch_data(query)