plainblack.com
Username Password
search
Bookmark and Share

Emask - email address masking

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

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
4gfox: "Great! But it doesn't appear to work inside a USS submission in 6.2.7 gamma. I tried the different syntaxes and always got it displaying nothing."
4Chris Kool: "Hi,

I am using version 6.2.8. gamma and at first the emask did not work with me.

I tried all the possibilities, but i also tried combinations of the known possibilities.

And the one that worked is:
Emask (a href=mailto:email@address.com,mail me /a);

Use the normal codes for HTML and Emask, but i did not closed the link and linked text => <"a href=......", is what i used. (without the "" ofcourse)

It displayed by me "mailto:"
DownloadEmask.pm Emask.pm
LinksNo Support Offered
Statistics Downloads: 517
Views: 10824
Rating: 4
Updated: 8/12/2005
Keywords macros Templates
NavigationBack to the Bazaar
© 2017 Plain Black Corporation | All Rights Reserved