I will check this out but URL parsing and decoding is quite complex thing to do in JS