Is there a quick way to clean up a url that is malformed with a 2nd question mark instead of ampersand? i.e.
thx
Is there a quick way to clean up a url that is malformed with a 2nd question mark instead of ampersand? i.e.
thx
'http://google.com?x=1?y=2'.split('?',2).map{|i| i.gsub('?', '&')}.join('?')
#=> "http://google.com?x=1&y=2"