E-mail obfuscation RULE/tag for DTI's Content Publisher system. [CSP (Caché Server Page) / COS (Caché Objectscript)]
Example 01: Container tag
<rg:email:obfuscate email="[email protected]" simple="" mode="" cc="[email protected]" bcc="[email protected]" subject="My Subject" body="My body" id="myId" class="myClass" rel="myRel" title="Title goes here" text="" var="foo">#(foo)#</rg:email:obfuscate>
Example 02: Self-closing tag
<rg:email:obfuscate email="[email protected]" simple="" mode="" cc="[email protected]" bcc="[email protected]" subject="My Subject" body="My body" id="myId" class="myClass" rel="myRel" title="Title goes here" text="Click here to e-mail Bob" />
Example 03: Return just the obfuscated e-mail address
<rg:email:obfuscate email="[email protected]" simple="true" />
Example 04: Return the obfuscated e-mail address and build the link manually
<rg:email:obfuscate email="[email protected]" simple="true" var="foo"><a #("href=""&#x6D;&#97;&#x69;&#x6C;&#x74;&#x6F;&#x3A;" _ foo _ """")#>#(foo)#</a></rg:email:obfuscate>
If you don't use DTI software, but you still want to use this code, then all you have to do is remove these lines of code:
<csr:class super="dt.common.page.Rule" />
<script language="cache" runat="compiler">
do ..RenderDTStartTag()
</script>
<script language="cache" runat="compiler">
do ..RenderDTEndTag()
</script>
- "email" Required. E-mail address to obfuscate.
- "simple" Set to 'true' if you want to return just the obfuscated e-mail address. Default is 'false'.
- "mode" Obfuscation mode. 1 = decimal, 2 = hexidecimal, 3 = mixture of modes 1 and 2. Default is mode 3.
- "cc" CC?
- "bcc" BCC?
- "subject" Subject?
- "body" Body?
- "id" Link 'id' attribute?
- "class" Link 'class' attribute?
- "rel" Link 'rel' attribute?
- "title" Link 'title' attribute? Note: This value is not obfuscated.
- "text" Link text. Default is the e-mail address.
- "var" Advanced: Local variable name to use when using this RULE as a container tag (vs. self-closing tag). Variable name MUST BE UNIQUE!
- 2011/04/04
- Deleted old repository on Github.
- Created new repository on Github that reflects naming/storage changes to DTI system.
- Added DTI required tags/code to RULE. See "Non-DTI customers" section above.
- Minor syntax tweaks.
- 2010/03/07
- Initial public release.