Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
[archived] wm_encode email encoder
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
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>.
Offline
Pages: 1
Topic closed