Make WordPress Core

Opened 19 years ago

Closed 18 years ago

Last modified 17 years ago

#1416 closed defect (bug) (fixed)

make_clickable() should check for (dot) in email link

Reported by: techwench's profile techwench Owned by: matt's profile matt
Milestone: Priority: low
Severity: minor Version: 1.5.2
Component: General Keywords: make_clickable, email, formatting, bg|needs-patch
Focuses: Cc:

Description

If a word is posted with the @ symbol in it, it displays as a mailto: link, even if it isn't an email address, like people who use symbols in their names (i.e. k@os).

I think the make_clickable() function should check for that extra . (dot) after the @ symbol. Something like:

$ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([a-z0-9\-_.]+)\.([^,< \n\r]+)#i", "$1<a href=\"mailto:$2@$3.$4\">$2@$3.$4</a>", $ret);

Change History (7)

#1 @h3h
19 years ago

Not to be overly pedantic, but IPV6 addresses are valid and contain no periods.

e.g. bob@FEDC:BA98:7654:3210:FEDC:BA98:7654:3210

#2 @techwench
19 years ago

  • Priority changed from normal to low
  • Severity changed from normal to minor

Yeah, but how many *everyday users* are going to reference ipv6 addresses? I can name 10 users, without even thinking, that don't even know what ipv6 is, but do post words with @ symbols in them that *aren't* email addresses.

The dev team has gone through great pains to make things overly simplified. Just look at texturize. It makes things easier for average joe users. So does the make_clickable function. But not all average joe users know how to use & #64; in place of the @ when they don't want an automatic mailto link...let alone editing the actual make_clickable function.

I can probably all but guarantee that the amount of people who use .com, .net, .org, etc in email addresses dwarf the amount of people who would use ipv6 addresses (or localhost addresses) exponentially.

It's a trivial issue for me, and probably a non-issue for any of the devs, but for someone who doesn't know any better, it can be extremely annoying and frustrating.

#3 @matt
19 years ago

  • Milestone set to 1.5.2
  • Owner changed from anonymous to matt
  • Status changed from new to assigned

#4 @markjaquith
19 years ago

  • Keywords bg|needs-patch added

#5 @markjaquith
19 years ago

  • Version changed from 1.5.1.1 to 1.5.2

#6 @matt
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed.

#7 @(none)
17 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.