diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index bc150c8a537cb..3d487d1c1d142 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -3135,7 +3135,7 @@ function make_clickable( $text ) { $ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret ); - $ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret ); + $ret = preg_replace_callback( '#([\s>])((ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret ); $ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret ); $ret = substr( $ret, 1, -1 ); // Remove our whitespace padding. diff --git a/tests/phpunit/tests/formatting/makeClickable.php b/tests/phpunit/tests/formatting/makeClickable.php index 8620f1efcb15e..c67358d9356ee 100644 --- a/tests/phpunit/tests/formatting/makeClickable.php +++ b/tests/phpunit/tests/formatting/makeClickable.php @@ -32,6 +32,7 @@ public function data_valid_mailto() { array( 'Foo.Bar@a.b.c.d.example.com' ), array( '0@example.com' ), array( 'foo@example-example.com' ), + array( 'www.foo.com@gmail.com' ), ); }