Email URL parsing not working correctly

Email URL parsing not working correctly

I received a bug ticket today complaining that anchor links are rendering incorrectly in your email client.  Upon investigation it looks like your client's parser is trying to convert text URLs into clickable anchor tags, but it's not doing it correctly.

If I send:
  1. <a href="http://google.com" title="Cool Link: http://google.com">This is a link</a>
It gets changed by your parser to:
  1. <a href="http://google.com" title="Cool Link: <a href=" http:="" google.com"="" target="_blank">http://google.com</a>" target='_blank'&gt;This is a link
This is broken HTML and causes rendering issues.  To fix this, your text parser needs to be sure to not mess with URLs that are inside of anchor tag attributes.