Came across this when searching for something. Another thing you might want to add would be to encode a URL (replacing spaces with %20 or whatever it is), etc.