views:

22

answers:

1

I am using Ruby 1.8.7 with Rails 2.3.9. When creating a drop down of email addresses using collection select, the emails addresses are not displaying. Instead I am seeing "[email protected]" in the drop down. Is there some switch that is causing this?

There seems to be some javascript that is being applied to each item in the drop down by rails when it sees an email in the list. The javascript is not there when I just list the user names.

<script type="text/javascript">
/* <![CDATA[ */
3(function(){try{var s,a,i,j,r,c,l=document.getElementById("__cf_email__");a=l.getAttribute("cf_sec");if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}}catch(e){}})();
4/* ]]> */ 
<script/>
A: 

Hoa you are correct this isn't rails related.

I found that this caused by the CDN we are using CloudFlare. As part of their security settings they obscure emails.

You can turn this off by going to the CloudFlare settings on your CloudFlare account and turn off E-mail Address Obfuscation.

Nicolo77