how do i transform
www.bestbuy.com/site/Electronics\Audio\abcat0200000.c=3fid=3dabcat0200000
into its original format ?
www.bestbuy.com/site/Electronics/Audio/abcat0200000.c?id=abcat0200000
urldecode ?
how do i transform
www.bestbuy.com/site/Electronics\Audio\abcat0200000.c=3fid=3dabcat0200000
into its original format ?
www.bestbuy.com/site/Electronics/Audio/abcat0200000.c?id=abcat0200000
urldecode ?
Well the thing with =3f
and =3d
is quoted-printable encoding. Ruby can decode it with the .unpack("M")
method.
The backslashes? They're just weird and wrong. It would probably be safe to string-replace them to /
since backslash should not be in a URL to begin with.