dmsnell
6909e6384a
General: Add support for unicode email addresses in is_email and sanitize_email
...
This adds support for the unicode address extensions in RFC 6530-3 and refactors the code so there are fewer long regexes and less duplication between sanitize_email and is_email. A new class, WP_Email_Address, provides the shared parts.
Opting out of unicode support is easy, default-filters.php adds unicode support by adding filters, which can be removed.
`sanitize_email` no longer does major changes like removing an entire subdomain from someone's address, it only cleans up things like soft hyphens and whitespace — changes that happen when coping an email address from text.
Developed in: https://github.com/WordPress/wordpress-develop/pull/5237
Discussed in: https://core.trac.wordpress.org/ticket/31992
Props agulbra, akirk, benniledl, dmsnell, ironprogrammer, justlevine, mdawaffe, mukeshpanchal27, SirLouen, tusharbharti.
Fixes #31992 .
Built from https://develop.svn.wordpress.org/trunk@62482
git-svn-id: http://core.svn.wordpress.org/trunk@61763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-06-10 15:05:45 +00:00
..
2026-05-26 08:15:43 +00:00
2026-04-22 18:14:46 +00:00
2026-05-28 15:28:46 +00:00
2026-03-26 01:20:54 +00:00
2026-06-09 04:26:42 +00:00
2026-05-14 13:49:47 +00:00
2026-05-19 13:34:37 +00:00
2026-05-21 03:44:43 +00:00
2026-05-08 14:04:45 +00:00
2026-06-10 00:38:44 +00:00
2026-02-27 23:18:40 +00:00
2026-06-01 10:40:30 +00:00
2026-03-21 23:49:55 +00:00
2026-03-20 15:41:01 +00:00
2026-06-04 09:11:43 +00:00
2026-03-29 22:31:34 +00:00
2026-06-06 11:08:41 +00:00
2026-02-17 23:01:43 +00:00
2026-03-18 17:51:48 +00:00
2026-01-10 23:52:47 +00:00
2026-03-23 14:55:58 +00:00
2026-02-27 23:36:42 +00:00
2026-06-02 14:09:40 +00:00
2026-03-30 05:32:44 +00:00
2026-02-15 23:18:43 +00:00
2026-05-26 09:30:39 +00:00
2026-05-28 07:47:41 +00:00
2026-05-11 12:47:43 +00:00
2026-04-22 18:14:46 +00:00
2026-03-23 08:58:47 +00:00
2026-03-12 23:24:40 +00:00
2026-02-10 16:37:40 +00:00
2026-02-25 15:27:46 +00:00
2026-01-11 06:36:49 +00:00
2026-05-13 19:30:47 +00:00
2026-03-14 19:23:49 +00:00
2026-03-30 05:32:44 +00:00
2026-03-30 05:32:44 +00:00
2026-03-19 13:41:50 +00:00
2026-02-23 05:34:45 +00:00
2026-03-14 23:55:49 +00:00
2026-06-04 13:03:43 +00:00
2026-02-14 00:37:41 +00:00
2026-03-10 11:29:34 +00:00
2026-03-12 23:25:20 +00:00
2026-04-02 23:49:43 +00:00
2026-06-04 14:09:43 +00:00
2026-01-11 06:50:42 +00:00
2026-06-02 14:58:42 +00:00
2026-06-03 05:19:44 +00:00
2026-03-30 05:32:44 +00:00
2026-03-03 05:54:45 +00:00
2026-05-08 10:39:43 +00:00
2026-05-22 23:41:42 +00:00
2026-02-27 23:18:40 +00:00
2026-03-27 22:19:44 +00:00
2026-02-24 06:33:36 +00:00
2026-01-28 01:07:42 +00:00
2026-03-02 09:11:52 +00:00
2026-05-13 03:03:45 +00:00
2026-06-10 15:05:45 +00:00
2026-05-21 07:57:42 +00:00
2026-05-22 07:00:45 +00:00
2026-03-10 12:24:47 +00:00
2026-01-30 12:52:40 +00:00
2026-01-10 05:03:50 +00:00
2026-02-20 12:53:37 +00:00
2026-05-31 10:46:40 +00:00
2026-02-13 17:52:44 +00:00
2026-03-03 17:12:44 +00:00
2026-03-30 05:32:44 +00:00
2026-01-28 20:55:41 +00:00
2026-05-31 19:20:42 +00:00
2026-06-09 03:36:43 +00:00
2026-01-07 16:48:03 +00:00
2026-03-01 23:04:45 +00:00
2026-03-01 23:04:45 +00:00
2026-03-30 05:32:44 +00:00
2026-03-30 05:32:44 +00:00
2026-04-27 18:31:40 +00:00
2026-05-16 05:05:28 +00:00
2026-03-03 05:54:45 +00:00
2026-03-11 01:32:44 +00:00
2026-03-03 05:54:45 +00:00
2026-03-10 11:43:18 +00:00
2026-02-13 17:52:44 +00:00
2026-06-02 06:04:39 +00:00
2026-03-19 13:15:37 +00:00
2026-06-01 10:40:30 +00:00
2026-01-11 06:50:42 +00:00
2026-01-11 06:50:42 +00:00
2026-05-31 19:20:42 +00:00
2026-03-03 05:54:45 +00:00
2026-05-22 07:00:45 +00:00
2026-03-30 05:32:44 +00:00
2026-03-30 05:32:44 +00:00
2026-03-30 05:07:43 +00:00
2026-05-08 14:04:45 +00:00
2026-05-07 20:48:44 +00:00
2026-05-26 00:18:45 +00:00
2026-05-31 17:57:43 +00:00
2026-05-08 19:03:43 +00:00
2026-02-13 20:26:40 +00:00
2026-03-24 12:19:52 +00:00
2026-06-10 15:05:45 +00:00
2026-03-12 23:24:40 +00:00
2026-03-30 00:17:42 +00:00
2026-01-28 22:43:42 +00:00
2026-02-12 10:49:41 +00:00
2026-06-10 15:05:45 +00:00
2026-05-26 15:10:45 +00:00
2026-05-16 05:05:28 +00:00
2026-06-03 09:42:31 +00:00
2026-02-10 15:20:51 +00:00
2026-05-02 05:55:44 +00:00
2026-05-31 07:32:35 +00:00
2026-05-02 05:55:44 +00:00
2026-06-04 14:09:43 +00:00
2026-02-28 19:59:46 +00:00
2026-05-28 15:28:46 +00:00
2026-06-03 11:28:43 +00:00
2026-02-03 19:31:46 +00:00
2026-03-12 23:25:20 +00:00
2026-03-12 23:25:20 +00:00
2026-03-30 05:32:44 +00:00
2026-03-18 11:00:42 +00:00
2026-02-11 22:11:45 +00:00
2026-03-10 12:34:44 +00:00
2026-05-08 14:04:45 +00:00
2026-03-15 22:51:41 +00:00
2026-05-22 07:00:45 +00:00
2026-01-10 05:29:48 +00:00
2026-02-15 23:18:43 +00:00
2026-05-08 14:04:45 +00:00
2026-06-08 21:25:37 +00:00
2026-03-30 05:32:44 +00:00
2026-05-19 02:45:50 +00:00
2026-05-28 15:28:46 +00:00
2026-03-03 05:54:45 +00:00
2026-03-10 21:11:48 +00:00
2026-02-20 02:25:46 +00:00
2026-01-11 06:36:49 +00:00
2026-03-09 18:43:38 +00:00
2026-03-30 05:32:44 +00:00
2026-01-09 02:48:51 +00:00
2026-05-23 18:17:42 +00:00
2026-02-07 06:06:43 +00:00
2026-06-10 15:05:45 +00:00
2026-01-19 16:58:45 +00:00
2026-03-30 05:32:44 +00:00