Index: includes/mail.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/mail.inc,v
retrieving revision 1.5
diff -u -w -B -F^f -r1.5 mail.inc
--- includes/mail.inc	26 Aug 2007 08:00:49 -0000	1.5
+++ includes/mail.inc	31 Aug 2007 20:08:10 -0000
@@ -276,7 +276,7 @@ function drupal_html_to_text($string, $a
   // Replace inline <a> tags with the text of link and a footnote.
   // 'See <a href="http://drupal.org">the Drupal site</a>' becomes
   // 'See the Drupal site [1]' with the URL included as a footnote.
-  $pattern = '@(<a[^>]+?href="([^"]*)">(.+?)</a>)@i';
+  $pattern = '@(<a[^>]+?href="([^"]*)"[^>]*?>(.+?)</a>)@i';
   $string = preg_replace_callback($pattern, '_drupal_html_to_mail_urls', $string);
   $urls = _drupal_html_to_mail_urls();
   $footnotes = '';
