WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#39742 closed defect (bug) (duplicate)

Password reset link does not show in most email clients due to "<" & ">" wrappers

Reported by: jackphilippi Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.1
Component: Login and Registration Keywords:
Focuses: administration Cc:

Description

Forgot password email are sent correctly, but in some cases, the password reset link is not included in the email because the email client / browser attempts to parse it as HTML. This can be solved by replacing the sharp brackets ("<" & ">") with square brackets or simply removing the wrapper characters altogether ( wp-login.php:332 ).

Change History (2)

#1 in reply to: ↑ description @SergeyBiryukov
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @jackphilippi, welcome to Trac! Thanks for the report.

Forgot password email are sent correctly, but in some cases, the password reset link is not included in the email because the email client / browser attempts to parse it as HTML.

Wrapping URLs in angle brackets is recommended behaviour by both the W3C and in Section C of the URI RFC.

This issue generally happens if a plugin or theme uses wp_mail_content_type filter to change the MIME type to text/html for all outgoing emails, but does not perform any further processing to make sure the HTML is valid. The solution in that case is to stop doing that and only enable that filter where needed, see the discussion in #21095, specifically comment:10:ticket:21095 and comment:12:ticket:21095

#23578 should improve the situation by checking if wp_mail_content_type is set to text/html and removing the brackets in that case.

#2 @swissspidy
2 years ago

#40356 was marked as a duplicate.

Note: See TracTickets for help on using tickets.