Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13488 closed defect (bug) (fixed)

html entities in pluggable text/plain mail notifications

Reported by: arena Owned by:
Milestone: 3.0 Priority: high
Severity: critical Version: 3.0
Component: Mail Keywords:
Focuses: Cc:


Reminder : in wp_mail

  • The default content type is 'text/plain' which does not allow using HTML.

in 2.9 we had

$notify_message  = sprintf( __('New comment on your post #%1$s "%2$s"'), $comment->comment_post_ID, $post->post_title ) . "\r\n";

in 3.0 we have

$notify_message  = sprintf( __( 'New comment on your post “%s”' ), $post->post_title ) . "\r\n";

All mails needs a review !

Attachments (1)

old_new_diff.txt (2.3 KB) - added by arena 4 years ago.
extract of some (not all) differences

Download all attachments as: .zip

Change History (5)

comment:1 nacin4 years ago

  • Priority changed from normal to high
  • Severity changed from normal to critical

Went in [14070], I presume.

arena4 years ago

extract of some (not all) differences

comment:2 ryan4 years ago

(In [14803]) Email messages should be plain text. Props arena. see #13488

comment:3 westi4 years ago

  • Resolution set to fixed
  • Status changed from new to closed


  • wp_notify_moderator
  • wp_notify_postauthor
  • wp_new_user_notification
  • wp_password_change_notification
  • newblog_notify_siteadmin
  • newuser_notify_siteadmin
  • wpmu_signup_blog_notification
  • wpmu_signup_user_notification
  • wpmu_welcome_notification
  • wpmu_welcome_user_notification

All look ok.

Closing as Fixed.

comment:4 demetris4 years ago

The HTML entities in those messages were my mistake. My apologies!

A question:

What would happen if we started using UTF-8 in such messages? Like:

sprintf(__('New comment on your post “%s”'), $post->post_title)

Would there be problems with any modern clients? (I know that the two clients I use, Thunderbird and Gmail, work fine with UTF-8.)

Note: See TracTickets for help on using tickets.