on-internet
← Community

How do I encode a complete http url string correctly?

Stack Overflow ·

I get a url string from a user and would like to transform it to a legal http url: http://one.two/three?four five should turn into http://one.two/three?four%20five However, URLEncoder does not help, as it encodes the entire string (including the legal ://). Help?

Comments

Sign in or sign up to comment and upvote.

No comments yet.