How to encode a URL string
<p>I have a string that contains a url which looks like this:</p>

<p><a href="http://www.test.com/images/tony" rel="nofollow">http://www.test.com/images/tony</a>'s pics.jpg</p>

<p>I need the url to look like this:</p>

<p><a href="http://www.test.com/images/tony%27s%20pics.jpg" rel="nofollow">http://www.test.com/images/tony%27s%20pics.jpg</a></p>

<p>How would I programmatically solve this with a url in a STRING form.  Thanks.</p>
