Say I have a URL
and I have a query entered by the user such as:
random word £500 bank $
I want the result to be a properly encoded URL:
What's the best way to achieve this? I tried URLEncoder and creating URI/URL objects but none of them come out quite right.