Skip to content

Commit

Permalink
FIX: Better query string parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Jun 27, 2017
1 parent 6931b98 commit 544c493
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/onebox/engine/google_maps_onebox.rb
@@ -1,5 +1,3 @@
require 'cgi'

module Onebox
module Engine
class GoogleMapsOnebox
Expand Down Expand Up @@ -122,7 +120,7 @@ def resolve_url!
when :canonical
uri = URI(@url)

query = CGI::parse(uri.query)
query = URI::decode_www_form(uri.query).to_h
if !query.has_key?("ll")
raise ArgumentError, "canonical url lacks location argument" unless query.has_key?("sll")
query["ll"] = query["sll"]
Expand Down

0 comments on commit 544c493

Please sign in to comment.