Auto Link with emails - 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: Auto Link with emails (/showthread.php?tid=56721) |
Auto Link with emails - El Forum - 01-14-2013 [eluser]rmccallum[/eluser] Hi guys, Using auto_link() to output the copy from a CMS controlled page onto the front end. I have 2 email addresses, recruit@ and bankrecruit@ in the stored copy. When I look at the front end the first email, recruit@, is auto_linked to become a linked email address but the second one becomes bank followed by the recruit@ email link. This is obviously not what I expected. Can anyone offer some advice? Auto Link with emails - El Forum - 01-15-2013 [eluser]rmccallum[/eluser] Just as a follow up it seems that auto_link() is matching all cases of recruit@ in which case the bankrecruit@ is being converted as it finds recruit@ first and converts that. If I remove the recruit@ then bankrecruit@ works fine. Also if I change the name to bank@ then both addresses work as expected. Is there a resolution for this? Auto Link with emails - El Forum - 01-15-2013 [eluser]Aken[/eluser] This appears to be a bug with the auto_link() function. I'll open an issue on Github about it, maybe fix it if I have some downtime soon. Basically it's a problem with str_replace() ignoring the "bank" part of the second email, since it's looking for a specific string (in your case, "recruit@..."). Edit: Looks like you created the issue already. Good stuff. |