Improved tracking URL generation to handle spaces in tracking numbers

This PR fixes #4149. Unfortunately 4149 is so old that I lost access to the `dpritchett/patch-1` branch (deleted it to do something else via the Github web UI no doubt) and so I'm having to resubmit it as a second PR.