Index: simplenews.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/simplenews/simplenews.module,v retrieving revision 1.76.2.139 diff -u -p -r1.76.2.139 simplenews.module --- simplenews.module 24 Nov 2009 20:01:27 -0000 1.76.2.139 +++ simplenews.module 24 Nov 2009 20:26:01 -0000 @@ -2064,7 +2064,7 @@ function simplenews_html_to_text($text, function _simplenews_absolute_mail_urls($match) { global $base_url, $base_path; static $regexp; - $url = ''; + $url = $label = ''; if ($match) { if (empty($regexp)) { @@ -2072,8 +2072,18 @@ function _simplenews_absolute_mail_urls( } list(, $url, $label) = $match; $url = strpos($url, '://') ? $url : preg_replace($regexp, $base_url .'/', $url); + + // If the link is formed by Drupal's URL filter, we only return the URL. + // The URL filter generates a label out of the original URL. + if (strpos($label, '...') == strlen($label) - 3) { + // Remove ellipsis from end of label. + $label = substr($label, 0, strlen($label) - 3); + } + if (strpos($url, $label) !== FALSE) { + return $url; + } + return $label .' '. $url; } - return $label .' '. $url; } /**