This macro is used to mask email addresses so that they still work in browsers, but will not be picked up by most web-crawling address harvesters. It does so by replacing certain characters with their HTML character-code equivalents: the m of mailto, the :, and any @ in the address.
It may be given a complete link from <a> to </a>, making it suitable for use in text created using htmlArea, which automatically recognises addresses and creates links.
It may also be passed a bare email address, and will create a link. This can be useful with the ^e; macro. In this case, an optional second parameter can be used to specify the text of the link.
Examples:
^Emask(<a href="mailto:fred@bloggs.com">Fred</a>);
^Emask(fred@bloggs.com);
^Emask(fred@bloggs.com,Fred Bloggs);
^Emask(them@domain.com,"Peter, Paul and Mary");
^Emask(^e;);
^Emask(^e;,email us);
To install, just copy the file Emask.pm into lib/WebGUI/Macro and add the usual line to the conf file:
Emask => Emask, \
-- Tony Mountifield