Welcome Guest, Not a member yet? Register   Sign In
auto_link() returns mailto links with javascript - how to prevent from that?
#1

[eluser]notset[/eluser]
Hello,

I want to use auto_link() function, but i need simple links without any additional security.

Inpite of:

Code:

It returns:

Code:
//<![CDATA[
    var l=new Array();
    l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]='|116';l[5]='|108';l[6]='|46';l[7]='|105';l[8]='|97';l[9]='|109';l[10]='|97';l[11]='|110';l[12]='|120';l[13]='|101';l[14]='|112';l[15]='|97';l[16]='|64';l[17]='|111';l[18]='|102';l[19]='|110';l[20]='|105';l[21]='>';l[22]='"';l[23]='|116';l[24]='|108';l[25]='|46';l[26]='|105';l[27]='|97';l[28]='|109';l[29]='|97';l[30]='|110';l[31]='|120';l[32]='|101';l[33]='|112';l[34]='|97';l[35]='|64';l[36]='|111';l[37]='|102';l[38]='|110';l[39]='|105';l[40]=':';l[41]='o';l[42]='t';l[43]='l';l[44]='i';l[45]='a';l[46]='m';l[47]='"';l[48]='=';l[49]='f';l[50]='e';l[51]='r';l[52]='h';l[53]=' ';l[54]='a';l[55]='<';
    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]));}
    //]]>

What i need to do?

Thank's.
#2

[eluser]tobben[/eluser]
You could probably edit the auto_link() function in url_helper.php, since it uses safe_mailto() instead of mailto().
#3

[eluser]dobbler[/eluser]
Hi,

I'm having a similar problem in that I have a cms of sorts where I'm using auto_link() to display the contents. If there is a text email link eg. <a href="mailto:[email protected]">Person's Name</a> it still goes after the email address and runs the safe_mailto() function resulting in the link being output in the view like so:


Quote://';l[1]='a';l[2]='/';l[3]='<';l[4]='|101';l[5]='|105';l[6]='|46';l[7]='|100';l[8]='|110';l[9]='|97';l[10]='|108';l[11]='|101';l[12]='|114';l[13]='|105';l[14]='|101';l[15]='|110';l[16]='|105';l[17]='|99';l[18]='|105';l[19]='|100';l[20]='|101';l[21]='|109';l[22]='|114';l[23]='|97';l[24]='|108';l[25]='|117';l[26]='|99';l[27]='|101';l[28]='|108';l[29]='|111';l[30]='|109';l[31]='|64';l[32]='|110';l[33]='|111';l[34]='|116';l[35]='|103';l[36]='|110';l[37]='|105';l[38]='|114';l[39]='|114';l[40]='|97';l[41]='|98';l[42]='|46';l[43]='|104';l[44]='|116';l[45]='|117';l[46]='|114';l[47]='>';l[48]='"';l[49]='|101';l[50]='|105';l[51]='|46';l[52]='|100';l[53]='|110';l[54]='|97';l[55]='|108';l[56]='|101';l[57]='|114';l[58]='|105';l[59]='|101';l[60]='|110';l[61]='|105';l[62]='|99';l[63]='|105';l[64]='|100';l[65]='|101';l[66]='|109';l[67]='|114';l[68]='|97';l[69]='|108';l[70]='|117';l[71]='|99';l[72]='|101';l[73]='|108';l[74]='|111';l[75]='|109';l[76]='|64';l[77]='|110';l[78]='|111';l[79]='|116';l[80]='|103';l[81]='|110';l[82]='|105';l[83]='|114';l[84]='|114';l[85]='|97';l[86]='|98';l[87]='|46';l[88]='|104';l[89]='|116';l[90]='|117';l[91]='|114';l[92]=':';l[93]='o';l[94]='t';l[95]='l';l[96]='i';l[97]='a';l[98]='m';l[99]='"';l[100]='=';l[101]='f';l[102]='e';l[103]='r';l[104]='h';l[105]=' ';l[106]='a';l[107]='<'; 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]));} //]]> ">Person's Name

I'd still like to use the safe_mailto() if that was an option but I'm not sure that it is.. Does anyone know of a quick and easy work around for this?

Thanks,

Rob.




Theme © iAndrew 2016 - Forum software by © MyBB