#14140 closed enhancement (fixed)
Wrap URL for password reset in angle brackets
Reported by: | demetris | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Keywords: | has-patch | |
Focuses: | Cc: |
Description
Some email clients do not handle well URLs that wrap across lines; that is, they fail to make them clickable in their entirety.
This can confuse WP users who are emailed a URL to reset their passwords, because clicking does not lead to a valid URL. See this wp-hackers thread:
http://groups.google.com/group/wp-hackers/t/155a6011e3a835a2
Core could fix this for several (most? all?) problematic email clients by simply enclosing the URL in angle brackets (the less than and greater than signs) before sending it.
I attach a tentative patch to get us going.
See also a couple of mentions/recommendations of the angle brackets as delimiters for URIs in plain text:
http://www.w3.org/Addressing/URL/5.1_Wrappers.html
http://www.ietf.org/rfc/rfc3986.txt (go to Appendix C)
Attachments (1)
Change History (8)
#1
@
14 years ago
- Component changed from General to Mail
- Keywords dev-feedback removed
- Milestone changed from Awaiting Review to 3.1
Agreed with westi on this (as said over wp-hackers). I imagine there are other instances where < > would be useful, but this is a start.
This ticket was mentioned in Slack in #core by boone. View the logs.
9 years ago
This ticket was mentioned in Slack in #buddypress by boone. View the logs.
9 years ago
#7
@
8 years ago
This has been causing my users (and therefore me) a few problems over the past couple of years. I've finally got around to taking a closer look at it. Some email clients will make the angled brackets part of the URL, therefore corrupting the URL.
I'm not sure if this is the right place to post this, but it comes up on Google when I search for the issue. Adding the following to your themes functions.php file will add another link to the password reset email (sans angled brackets).
function fix_password_reset_link($message, $key, $user_login, $user_data) { $message .= "\r\nLink not working? Copy and paste the following into your browser address bar:\r\n\r\n"; $message .= network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login'); return $message; } add_filter( 'retrieve_password_message', 'fix_password_reset_link', 10, 4);
Encloses URL for password reset in angle brackets