#48 Wrong regex for turning email addresses to href's

closed-fixed
Luke Ehresman
8
2000-08-21
2000-08-21
Anonymous
No

The regex in url_parser.php parseEmail() detects false
email addresses.

i.e. it will detect Excite@home has an email address
because it does not check @home requires at least a period
and some text.

Ive replaced the regex with this which works better.

$body = eregi_replace ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_|-)+\.(\.|[a-
z]|[0-9]|_|-)+", "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body);

maral@phase-one.com.au

Discussion

  • Lewis Bergman
    Lewis Bergman
    2000-08-21

    Your bug has been assigned. How quick this is resolved depends on
    the severity and the probability that it might affect a large
    number of users. If you were logged in at the time of submission
    you wil be informed via email of this bugs status. If not, you
    may check back here to see how we are doing on it. Please
    remember your bug id number for quick reference.

    Thanks for your help!

     
  • Lewis Bergman
    Lewis Bergman
    2000-08-21

    • priority: 5 --> 8
    • assigned_to: nobody --> lkehresman
     
  • Luke Ehresman
    Luke Ehresman
    2000-08-21

    • status: open --> closed
     
  • Luke Ehresman
    Luke Ehresman
    2000-08-21

    • status: closed --> closed-fixed
     
  • Luke Ehresman
    Luke Ehresman
    2000-08-21

    added.. thanks