[wp-trac] [WordPress Trac] #21095: Reset password link is in < RESET_URL > - Gmail does not show it.

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 28 12:12:56 UTC 2012


#21095: Reset password link is in < RESET_URL > - Gmail does not show it.
--------------------------+------------------------------
 Reporter:  tommix        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Mail          |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  close         |
--------------------------+------------------------------
Changes (by dd32):

 * component:  Users => Mail


Comment:

 > WP doesnt send html, it sends text but mail type (header) is changed to
 HTML.

 By changing the mime type, you're forcing the !WordPress plain text emails
 content to be parsed as HTML, Since html uses < and > for tags, it's
 causing the content to break.  Since you're not doing any further
 processing to the emails, it sounds like setting the content type for all
 emails isn't what you should be doing, it won't suddenly make emails
 better.

 So, Either stop doing that, or also apply esc_html to the mail body, and
 it'll work as you expect.

 You'd need to do something like this: (untested)
 {{{
 add_filter( 'wp_mail', 'html_email_encode_body' );
 function html_email_encode_body( $mail ) {
   $mail['message'] = esc_html( $mail['message'] );
   return $mail;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21095#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list