Factored out URL decoding method.