change decodeURIComponent to unescape

decodeURIComponent(..) crashes on malformed uri's, so I am changing it
to use unescape(..) instead.