First Last Prev Next    No search results available
Details
: %to(mail)% and %from(mail)% break wrapping links
Bug#: 25538
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows 7
: unspecified
: P2
: enhancement
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Axel Grude <axel.grude@gmail.com>
Assigned To: Axel Grude <axel.grude@gmail.com>

Attachments
0.9.4 Prerelease 48 (317.98 KB, application/x-xpinstall)
2013-08-19 02:09, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2013-08-19 02:03
%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.
------- Comment #1 From Axel Grude 2013-08-19 02:09:25 -------
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)%" &lt;%from(mail,islinkable)%&gt;<br>

Output:
<b>From: </b>"Axel Grude" <a class="moz-txt-link-rfc2396E"
href="mailto:axel__grude@gmail.com">&lt;axel__grude@gmail.com&gt;</a><br>

Example 2
<b>From:   </b>"%from(name)%" <a
href="http://smarttemplate4.mozdev.org/templates.html?query=%from(mail,islinkable)%">
&lt;%from(mail,islinkable)%&gt;</a>

Output:
<b>From: </b>"Axel Grude" <a
href="http://smarttemplate4.mozdev.org/templates.html?query=axel__grude@gmail.com">&lt;axel__grude@gmail.com&gt;</a><br>

First Last Prev Next    No search results available