Skip to:
Content

Opened 17 months ago

Last modified 11 months ago

#4684 reopened defect (bug)

Notification email encoding issues

Reported by: blg002 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 1.2
Component: Core Keywords:
Cc:

Description

I have a topic titled “What’s your biggest challenge?” in the notification emails the apostrophe is converted into its numeric entity.

e.g. it becomes: What&#039 ;s your biggest challenge?

I mostly see this in the subject line, but sometimes in the body, and not just with an apostrophe but double-quotes, etc.

Change History (6)

comment:1 r-a-y17 months ago

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

BuddyPress Core does not send email notifications with the topic title.

I'm guessing you are either using the BuddyPress Group Email Subscription plugin or bbPress 2 for these emails.

Please find out which plugin is causing the problem and post an issue to the respective plugin developers.

Thanks!

comment:2 blg00217 months ago

Thanks for the response. I'm going to assume it's bbPress 2, since we are only using the bbPress Site Wide Forums.

FYI here are the plugins im using:
AutoChimp 2.02
bbPress 2.2.2
BP Labs 1.3
BuddyPress 1.6.1
Buddypress Component Stats 1.0
BuddyPress Global Unified search 1.0.1
Disqus Comment System 2.73
Google Analytics for WordPress 4.2.8
Invite Anyone 1.0.17
New User Approve 1.4.1
Private BuddyPress 1.0.4
Safe Redirect Manager 1.5
Typekit 1.2.3
WordPress Importer 0.6
ZK Advanced Feature Post 1.8.21

WordPress Version 3.4.2

comment:3 r-a-y17 months ago

  • Milestone set to 1.7
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 1.6.1 to 1.2

Upon further review, there are problems with HTML entities not being decoded in BuddyPress emails.

To test, @mention or PM someone and type in something like:

Coffee & TV

The notification email will output:

Coffee & TV

This is happening because we run wp_filter_kses() before saving the content into the DB. This runs wp_kses_normalize_entities(), which encodes ampersands and various HTML entities.

By the time, it reaches wp_mail() in the various BP components, we need to decode the HTML entities for plain-text emails. This currently isn't being done.

Could probably fix this easily by running wp_specialchars_decode() on all email content before sending.

I'll need to test bbPress to see if the same thing is happening there as well.

comment:4 johnjamesjacoby17 months ago

Any updates on this? I introduced a bp_get_email_subject() function in r6589 to handle the blogname being encoded in subject lines.

comment:5 johnjamesjacoby17 months ago

  • Milestone changed from 1.7 to 1.8

This is annoying, but not a regression. Punting to 1.8 to clean up 1.7.

comment:6 boonebgorges11 months ago

  • Milestone changed from 1.8 to Future Release
Note: See TracTickets for help on using tickets.