Welcome Guest, Not a member yet? Register   Sign In
Auto Link with emails
#1

[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?
#2

[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?
#3

[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.




Theme © iAndrew 2016 - Forum software by © MyBB