Steps to recreate:
1) Create a newsletter issue and put the following in the body:
Before http://someplace.com After
2) Send the newsletter
3) Receive as a plain text email:
Before http://someplace.com http://someplace.com After
(Both URLs are converted to links)
I have tracked the problem down to simplenews_html_to_text(). In my example it is receiving this:
<p>Before:<br />
<a href="http://someplace.com" title="http://someplace.com">http://someplace.com</a><br />
After.</p>
_simplenews_absolute_mail_urls() returns this:
<p>Before:<br />
http://someplace.com http://someplace.com<br />
After.</p>
I'm curious what the return line for _simplenews_absolute_mail_urls() was meant to do?
return $label .' '. $url;
In my case, it just repeats the same URL twice.
Thanks
Comments
Comment #1
Karlheinz commentedIt makes sense if you believe that a link's URL and its text will be different, e.g.
<a href="http://www.example.com">Example</a>...becomes
Example http://www.example.comFor a solution, see burn_ru's comment here:
http://drupal.org/node/476756
If you don't want to look, the solution is to look for the _simplenews_absolute_mail_urls function in simplenews.module, and replace this:
...with this:
EDIT: See the duplicate thread for a patch. I haven't tried it yet, but it looks solid.
Comment #2
sutharsan commentedDuplicate of #476756: URL displayed twice in email