If a tweet contains an email address, the twitter_pull_add_links function will convert the @domain part of the email address in to a link to a twitter user using pattern '#@(\w+)#ims'. This pattern should be modified to avoid this, maybe by matching a word boundary ahead of the @ sign?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Altcom_Alan’s picture

I've just come across the same issue - I've modified line 210 to:

$pattern = '#(?<=\s|^)@(\w+)#ims';

It matches @TWITTER_NAME either at the start of the string/line or after a space using a positive look behind assertion so it no longer matches parts of email addresses.

I've included a patch against 7.x-2.0-alpha2