Project

General

Profile

Actions

Bug #661

closed

HTML Special Characters Appear in Email Notification Text

Added by Matt Gold about 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority name:
Low
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2011-04-01
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Here's a sample from a recent group notification email:

Matthew K. Gold started the forum topic "Changes to our group and a few thoughts about today's session" in the group A Living Laboratory: Redesigning General Education for a 21st-Century College of Technology:


Files

Actions #1

Updated by Boone Gorges about 13 years ago

Can you send that again? I don't see the problem.

Actions #2

Updated by Boone Gorges about 13 years ago

  • Priority name changed from Normal to Low
Actions #4

Updated by Matt Gold about 13 years ago

Another screenshot from a different update -- ampersands appear as special characters in the body of the message.

Actions #5

Updated by Boone Gorges about 13 years ago

  • Assignee changed from Boone Gorges to Raymond Hoh

This seems to be a problem with character encoding in buddypress-group-email-subscription. Ray, can you have a look? If it's a problem with the plugin itself, let me know and I'll commit the fix back to the distribution version of the plugin.

Actions #6

Updated by Raymond Hoh about 13 years ago

The problem appears to be with the ass_digest_filter() function (located in bp-activity-subscription-digest.php).

Particularly the usage of wptexturize() in ass_digest_filter().
Try removing that and I believe it will fix the encoding issue.

Haven't tested to be sure though.

Actions #7

Updated by Raymond Hoh about 13 years ago

Properly decode single quotations - fixed in:
https://github.com/castiron/cac/commit/c2153ababaeca358e3e7e602aee7a9cf6f3541d8

Boone, you can commit the fix back to the BP Group Email plugin.

Matt, I can't duplicate the ampersand bug in the second screenshot. Can you try and list the steps to reproduce?

Actions #8

Updated by Matt Gold about 13 years ago

Matt, I can't duplicate the ampersand bug in the second screenshot. Can you try and list the steps to reproduce?

Hard for me to do, since this was just an email notification that arrived in my inbox. I did not write the message that it contains. Perhaps the original poster copied text from MS Word or something?

Actions #9

Updated by Raymond Hoh about 13 years ago

Matt Gold wrote:

Matt, I can't duplicate the ampersand bug in the second screenshot. Can you try and list the steps to reproduce?

Hard for me to do, since this was just an email notification that arrived in my inbox. I did not write the message that it contains. Perhaps the original poster copied text from MS Word or something?

Can you tell me the group email setting you have for that group? It will help to know if it was a digest or if you are set to receive email automatically.

Actions #10

Updated by Matt Gold about 13 years ago

I receive messages as they are posted; my status is "All Mail" (ie., no digest)

Actions #11

Updated by Raymond Hoh almost 13 years ago

That was my group email setting as well and I didn't get the ampersand bug. Though I should mention I did my testing on a different local sandbox and not on the master branch.

Might be worth testing on cdev.

Actions #12

Updated by Matt Gold almost 13 years ago

Might be worth testing on cdev.

Yes, agreed. Might also be worth testing on the production server in a hidden test group.

Actions #13

Updated by Matt Gold almost 13 years ago

I received another notification message today with errant HTML characters. Actually, I received two notifications; screenshots of both are attached.

Actions #14

Updated by Raymond Hoh almost 13 years ago

Matt Gold wrote:

I received another notification message today with errant HTML characters. Actually, I received two notifications; screenshots of both are attached.

Okay, the first screenshot looks like it's missing strip_tags(). I'll take a look into this.

What's wrong with the second screenshot?

Actions #15

Updated by Raymond Hoh almost 13 years ago

Re: first screenshot - I can't duplicate this on my local sandbox. Production is running an older version of the Group Email Subscription plugin (v2.8.2) vs. the newer version and the version on master branch (v2.8.4).

This is likely the cause of the ampersand bug and the strip_tags() bug.
When we push Commons 1.2, this will fix these problems.

Boone, does cdev run the master branch? If so, we can test for these bugs.

Actions #16

Updated by Matt Gold almost 13 years ago

Raymond Hoh wrote:

Matt Gold wrote:

I received another notification message today with errant HTML characters. Actually, I received two notifications; screenshots of both are attached.

Okay, the first screenshot looks like it's missing strip_tags(). I'll take a look into this.

What's wrong with the second screenshot?

Thanks, Ray. Nothing was wrong with the second screenshot -- it was just odd that I received two notifications of the same post, and weird that one had HTML characters and the other didn't....

Actions #17

Updated by Raymond Hoh almost 13 years ago

  • Status changed from Assigned to Resolved

Matt Gold wrote:

Raymond Hoh wrote:

Matt Gold wrote:

I received another notification message today with errant HTML characters. Actually, I received two notifications; screenshots of both are attached.

Okay, the first screenshot looks like it's missing strip_tags(). I'll take a look into this.

What's wrong with the second screenshot?

Thanks, Ray. Nothing was wrong with the second screenshot -- it was just odd that I received two notifications of the same post, and weird that one had HTML characters and the other didn't....

Thanks for the additional details, Matt.

I am able to duplicate the double notifications bug. For the purposes of this ticket, I will close this one and create a new ticket about this.

Actions #18

Updated by Matt Gold almost 13 years ago

Thank you, Ray!

Actions

Also available in: Atom PDF