Added URI escaping when using the next_url from Cloud controller