Content last modified Monday 3 September 2018
hop to #bottom
Categories:
Author:
Current version:
1.0
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

wm_encode

This is a drop-in replacement for the txp:email tag which attempts to provide a more robust block against spam harvesters. It can generate both a Javascript-based encoder which can only be “cracked” by a harvester that runs Javascript and a somewhat more sophisticated entity encoder that will first convert an address from “foo@bar.com” form to “foo at bar dot com” and then encode with a mix of decimal and hex entities. (This is less convenient due to the slight “mangling” of the address.)

<txp:wm_encode email="foo@bar.com" linktext="email me" title="popup" />

In addition, there are script and noscript attributes to control generation of the Javascript-based and text-based encoding blocks, respectively. Use script="0" to not generate the Javascript block and script="1" to generate it, and noscript="0" and noscript="1" for the text block.

By default, only the Javascript block is generated. The default settings are marked with comments in the function and can be changed. If both blocks are generated, the text block will be wrapped in <noscript> tags, so Javascript-enabled browsers will only see the first one. If only the text block is generated, it will not be wrapped in <noscript>.

Download g1.19 version
Download 1.0rc version

Article Request Count:
Posted here:
22 Mar 2005

You know you want to visit the Archives.
Published with Textpattern