Difference between revisions of "Widget:SafeEmail"

From Open Energy Information

(Editing widget to make it compatible with coming Smarty upgrade, quiets numerous warnings.)
(Cleaning up extra whitespace.)
 
Line 21: Line 21:
 
[[Category:Widgets]]
 
[[Category:Widgets]]
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<!--Widget:SafeEmail-->
+
<!--Widget:SafeEmail--><!--{assign var='text_chk' value=$text|default:$email}--><!--{mailto address=$email text=$text_chk encode="javascript"}--></includeonly>
<!--{assign var='text_chk' value=$text|default:$email}-->
 
<!--{mailto address=$email text=$text_chk encode="javascript"}-->
 
</includeonly>
 

Latest revision as of 09:56, 12 February 2020

This widget creates a mailto: link safely by obfuscating the email address to make it considerably more difficult for spammers to mine the address from the page code.

Parameters
  • email - the address(es) to be included in the mailto link
  • text - the text to display (optional, default email)
Note: Multiple addresses must be separated by a semi-colon.


Usage
{{#Widget:SafeEmail|email=jane.doe@example.org|text=Email Jane Doe}}


Example