#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)
Note: See
TracTickets for help on using
tickets.
Hi @jackphilippi, welcome to Trac! Thanks for the report.
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 totext/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 totext/html
and removing the brackets in that case.