I have a string that contains an escaped URL:
http%3A%2F%2Fexample.com%3Ffoo%3Dbar+baz
I'm trying to decode it to the following:
http://example.com?foo=bar+baz
However, I can't find any suitable function exported by Drakma. I can encode like so:
* url-string
"http://example.com?foo=bar+baz"
* (drakma:url-encode url-string :utf-8)
"http%3A%2F%2Fexample.com%3Ffoo%3Dbar%2Bbaz"
... so I figure I'm on the right track. If anyone could supply a nudge in the right direction I'd appreciate it :-) I'm using SBCL 1.0.54, built from source on 64-bit Linux Mint 13.
If it helps clarify what I'm trying to do, in Ruby, I'd do the following:
> uri_string = "http%3A%2F%2Fexample.com%3Ffoo%3Dbar+baz"
=> "http%3A%2F%2Fexample.com%3Ffoo%3Dbar+baz"
> URI.decode uri_string
=> "http://example.com?foo=bar+baz"