Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

mhulse/custom.rg.EmailObfuscateRule

Repository files navigation

About:

E-mail obfuscation RULE/tag for DTI's Content Publisher system. [CSP (Caché Server Page) / COS (Caché Objectscript)]

Examples:

Example 01: Container tag

<rg:email:obfuscate email="bob@bob.com" simple="" mode="" cc="bob@cc.com" bcc="bob@bcc.com" 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="bob@bob.com" simple="" mode="" cc="bob@cc.com" bcc="bob@bcc.com" 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="bob@bob.com" simple="true" />

Example 04: Return the obfuscated e-mail address and build the link manually

<rg:email:obfuscate email="bob@bob.com" simple="true" var="foo"><a #("href=""&amp;#x6D;&amp;#97;&amp;#x69;&amp;#x6C;&amp;#x74;&amp;#x6F;&amp;#x3A;" _ foo _ """")#>#(foo)#</a></rg:email:obfuscate>

Non-DTI customers:

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>

Rule parameters:

  • "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!

Changelog:

  • 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.

About

E-mail obfuscation RULE/tag for DTI's Content Publisher system. [CSP (Caché Server Page) / COS (Caché Objectscript)]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors