CodeIgniter Forums
question about safe_mailto function - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: question about safe_mailto function (/showthread.php?tid=4110)



question about safe_mailto function - El Forum - 11-07-2007

[eluser]emperius[/eluser]
I want to use safe_mailto function for image.

Does this function alllow such things...


question about safe_mailto function - El Forum - 11-07-2007

[eluser]xwero[/eluser]
If you want to have not hotlinkable or not downloadable images you have to use other techniques.
the safe_mailto function is only for e-mail addresses.


question about safe_mailto function - El Forum - 11-07-2007

[eluser]emperius[/eluser]
Yes I understand that.

I want to make somenthink lke this
Code:
<a href="mailto:[email protected]"><img src="myimage.gif"></a>

Is it possible with safe_mailto function?


question about safe_mailto function - El Forum - 11-08-2007

[eluser]llbbl[/eluser]
Yes i would imagine so. It doesn't matter what is between the <_a_> tags.


question about safe_mailto function - El Forum - 03-21-2008

[eluser]skrobma[/eluser]
I couldn't get safe_mailto to work with an image also. Does anyone have a working example?

With this code:
Code:
&lt;?php echo safe_mailto('[email protected]','<img src="images/landingpage.jpg" name="Logo" alt="My Pod Studios show yourself " style="border-style: none">'); ?&gt;
I GET:


//&lt;![CDATA[
Code:
var l=new Array();    l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]='|62';l[5]='|34';l[6]='|101';l[7]='|110';l[8]='|111';l[9]='|110';l[10]='|32';l[11]='|58';l[12]='|101';l[13]='|108';l[14]='|121';l[15]='|116';l[16]='|115';l[17]='|45';l[18]='|114';l[19]='|101';l[20]='|100';l[21]='|114';l[22]='|111';l[23]='|98';l[24]='|34';l[25]='|61';l[26]='|101';l[27]='|108';l[28]='|121';l[29]='|116';l[30]='|115';l[31]='|32';l[32]='|34';l[33]='|32';l[34]='|102';l[35]='|108';l[36]='|101';l[37]='|115';l[38]='|114';l[39]='|117';l[40]='|111';l[41]='|121';l[42]='|32';l[43]='|119';l[44]='|111';l[45]='|104';l[46]='|115';l[47]='|32';l[48]='|115';l[49]='|111';l[50]='|105';l[51]='|100';l[52]='|117';l[53]='|116';l[54]='|83';l[55]='|32';l[56]='|100';l[57]='|111';l[58]='|80';l[59]='|32';l[60]='|121';l[61]='|77';l[62]='|34';l[63]='|61';l[64]='|116';l[65]='|108';l[66]='|97';l[67]='|32';l[68]='|34';l[69]='|111';l[70]='|103';l[71]='|111';l[72]='|76';l[73]='|34';l[74]='|61';l[75]='|101';l[76]='|109';l[77]='|97';l[78]='|110';l[79]='|32';l[80]='|34';l[81]='|103';l[82]='|112';l[83]='|106';l[84]='|46';l[85]='|101';l[86]='|103';l[87]='|97';l[88]='|112';l[89]='|103';l[90]='|110';l[91]='|105';l[92]='|100';l[93]='|110';l[94]='|97';l[95]='|108';l[96]='|47';l[97]='|115';l[98]='|101';l[99]='|103';l[100]='|97';l[101]='|109';l[102]='|105';l[103]='|34';l[104]='|61';l[105]='|99';l[106]='|114';l[107]='|115';l[108]='|32';l[109]='|103';l[110]='|109';l[111]='|105';l[112]='|60';l[113]='>';l[114]='"';l[115]='|109';l[116]='|111';l[117]='|99';l[118]='|46';l[119]='|115';l[120]='|111';l[121]='|105';l[122]='|100';l[123]='|117';l[124]='|116';l[125]='|115';l[126]='|100';l[127]='|111';l[128]='|112';l[129]='|121';l[130]='|109';l[131]='|64';l[132]='|115';l[133]='|101';l[134]='|108';l[135]='|97';l[136]='|115';l[137]=':';l[138]='o';l[139]='t';l[140]='l';l[141]='i';l[142]='a';l[143]='m';l[144]='"';l[145]='=';l[146]='f';l[147]='e';l[148]='r';l[149]='h';l[150]=' ';l[151]='a';l[152]='<';
    for (var i = l.length-1; i >= 0; i=i-1){
    if (l[i].substring(0, 1) == '|') [removed]("&#"+unescape(l[i].substring(1))+";");
    else [removed](unescape(l[i]));}
//]]>



Which displays a URL on the screen as:
Code:
<img src="images/landingpage.jpg" name="Logo" alt="My Pod Studios show yourself " style="border-style: none">
The image is not displayed.


question about safe_mailto function - El Forum - 03-21-2008

[eluser]Derek Jones[/eluser]
The JavaScript writes entities of the characters to the document, which is part of its obfuscation pattern to help prevent harvesting and to prevent special characters in the title from breaking the tag.