views:

150

answers:

1

hi,

I've implemented a Drupal website.

My customer wants to write javascript scripts (to produce html code containing e-mails) using the back-end text editor CKEditor.

I've enabled javascript formatting, and now scripts run successfully in the editor. However, as result of the email script I see the unprocessed html content in my page:

<a href="mailto:[email protected]" class="email">[email protected]</a>

In other words, I see the html tag, instead of seeing the e-mail link.

I guess this is due to the parenthesis formatting. If I replace &lt; with < in Firebug, the html is processed and the links works. However I'm not able to do this from the editor. If I type < or &lt; the result is the same...

This is the script (as you can see the script uses < symbol:

<script type="text/javascript">
var mtmgkch = ['a','l',':','r','l','e','s','"','r','c','@','l','e','e','c','f','a','r','l','e','/','r','l','s','.','o','h',' ','c','=','r','i','"','l','t','o','r','.','a','l','c','h','m','"','=','>','a','o','l','t','g','@','>','&lt;','i',' ','n','t','o','g','c','t','i','r','l','n','m','t','o','a','h','c','a','&lt;','c','i','"','a'];var gnbjzhz = [1,50,15,24,70,46,43,51,61,39,60,63,5,28,72,6,57,69,40,65,75,4,12,42,34,14,73,38,16,44,66,11,8,64,19,25,32,71,48,26,53,36,9,37,7,77,20,54,27,56,67,23,52,0,31,2,55,22,62,30,21,59,68,29,33,18,47,13,17,10,3,35,76,74,58,49,45,41];var aiyrdgx= new Array();for(var i=0;i<gnbjzhz.length;i++){aiyrdgx[gnbjzhz[i]] = mtmgkch[i]; }for(var i=0;i<aiyrdgx.length;i++){document.write(aiyrdgx[i]);}
</script>

thanks

A: 

If you're simply looking for email obfuscation for protection from spam bots, check out these two modules which will save the client from having to create JavaScript for each email they may type in:

GApple

related questions