[wp-trac] [WordPress Trac] #54416: Some WordPress generated emails escape special chars in the email address while other emails do not.

WordPress Trac noreply at wordpress.org
Tue Aug 19 07:21:30 UTC 2025


#54416: Some WordPress generated emails escape special chars in the email address
while other emails do not.
-------------------------------------------------+-------------------------
 Reporter:  ltuspe                               |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Mail                                 |     Version:  5.8
 Severity:  major                                |  Resolution:
 Keywords:  good-first-bug has-test-info needs-  |     Focuses:
  patch                                          |
-------------------------------------------------+-------------------------

Comment (by jdeep):

 @SirLouen,

 For the second part, I believe there is no way to prevent slashing
 prematurely and the only way to do it is to un-slash in
 `send_confirmation_on_profile_email`. On a related note, Is there any
 reason of escaping an email address [https://github.com/WordPress
 /wordpress-develop/blob/946649af8db44b4c969c092d2f77643a1dc2ec4e/src/wp-
 admin/user-edit.php#L113 like it is done here]? This breaks email
 addresses with special characters. Shouldn't
 [https://developer.wordpress.org/reference/functions/sanitize_email/
 sanitize email] be a better choice?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54416#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list