Bugzilla@Mozdev – Bug 25538
%to(mail)% and %from(mail)% break wrapping links
Last modified: 2013-08-19 02:11:44
You need to log in before you can comment on or make changes to this bug.
%to(mail)% %from(mail)% %cc(mail)% etc. are always wrapped in fake <a> </a>. this was intended to remove unwanted <a href="Mailto:"> .. </a> wrapping in the receiving mail client. Unfortunately this also leads to breaking any added links that wrap this variable. E.g. the template: <a href="http://test.com>%from(mail)%</a> may be expanded to: <a href="http://test.com><a>fred@test.com</a></a> desired: a switch that disables the automatic wrapping in empty <a> tags to disable this behavior.
Created an attachment (id=7654) [details] 0.9.4 Prerelease 48 Added the switch islinkable to suppress wrapping as described. Usage: %from(mail,islinkable)% %to(mail,islinkable)% %cc(mail,islinkable)% %bcc(mail,islinkable)% %identity(mail,islinkable)% Example 1 <b>From: </b>"%from(name)%" <%from(mail,islinkable)%><br> Output: <b>From: </b>"Axel Grude" <a class="moz-txt-link-rfc2396E" href="mailto:axel__grude@gmail.com"><axel__grude@gmail.com></a><br> Example 2 <b>From: </b>"%from(name)%" <a href="http://smarttemplate4.mozdev.org/templates.html?query=%from(mail,islinkable)%"> <%from(mail,islinkable)%></a> Output: <b>From: </b>"Axel Grude" <a href="http://smarttemplate4.mozdev.org/templates.html?query=axel__grude@gmail.com"><axel__grude@gmail.com></a><br>