Hello,

I have an address formatted like this in one of my pages: Tom_O'Shay@foor.bar.org

It is not process by urlfilter.

According to http://tools.ietf.org/html/rfc3696#page-5, this should be legal.

Without quotes, local-parts may consist of any combination of
   alphabetic characters, digits, or any of the special characters

      ! # $ % & ' * + - / = ?  ^ _ ` . { | } ~

Thanks!

Comments

Uwe Hermann’s picture

Version: x.y.z » 5.x-dev

Good point. Moving to 5.x-dev.

ricabrantes’s picture

Any news, i think this moving to D7.x-dev..

LAsan’s picture

Bumping.

damien tournoud’s picture

Title: Email with apostrophe not processed » urlfilter does not catch several legal email address formats (local part with ', quoted local part, etc.)
Version: 5.x-dev » 7.x-dev

The issue is more general and still exists in 7.x.

mdupont’s picture

Is this issue still present in latest 7.x?

damienmckenna’s picture

The latest code as of today uses the PHP >5.2 function filter_var() to do the filtering, so I think this may be irrelevant now.

j.somers’s picture

Status: Active » Fixed

This is indeed fixed by using filter_var().

var_dump(filter_var("foor.bar.org", FILTER_VALIDATE_EMAIL));

jensen@atlantis:/var/www/drupal/temp$ php email_test.php 
string(23) "Tom_O'Shay@foor.bar.org"

If the email address would be invalid the output would be bool(false)

damienmckenna’s picture

Please note that PHP's filter_var/FILTER_VALIDATE_EMAIL does not correctly support the RFC standards, so it is entirely possible to have valid email addresses which fail this test. See #265548: valid_email_address() is not RFC compliant for more info.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.