Bug #661
closedHTML Special Characters Appear in Email Notification Text
Added by Matt Gold over 13 years ago. Updated over 13 years ago.
0%
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
Screen_shot_2011-04-03_at_9.59.51_PM.png (43.2 KB) Screen_shot_2011-04-03_at_9.59.51_PM.png | Matt Gold, 2011-04-03 10:00 PM | ||
Screen_shot_2011-04-04_at_1.46.44_AM.png (102 KB) Screen_shot_2011-04-04_at_1.46.44_AM.png | Matt Gold, 2011-04-04 01:47 AM | ||
Screen_shot_2011-04-28_at_8.07.27_AM.png (71.2 KB) Screen_shot_2011-04-28_at_8.07.27_AM.png | Matt Gold, 2011-04-28 08:10 AM | ||
Screen_shot_2011-04-28_at_8.08.15_AM.png (50.7 KB) Screen_shot_2011-04-28_at_8.08.15_AM.png | Matt Gold, 2011-04-28 08:10 AM |
Updated by Boone Gorges over 13 years ago
Can you send that again? I don't see the problem.
Updated by Boone Gorges over 13 years ago
- Priority name changed from Normal to Low
Updated by Matt Gold over 13 years ago
Screenshot attached.
Updated by Matt Gold over 13 years ago
Another screenshot from a different update -- ampersands appear as special characters in the body of the message.
Updated by Boone Gorges over 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.
Updated by Raymond Hoh over 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.
Updated by Raymond Hoh over 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?
Updated by Matt Gold over 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?
Updated by Raymond Hoh over 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.
Updated by Matt Gold over 13 years ago
I receive messages as they are posted; my status is "All Mail" (ie., no digest)
Updated by Raymond Hoh over 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.
Updated by Matt Gold over 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.
Updated by Matt Gold over 13 years ago
- File Screen_shot_2011-04-28_at_8.07.27_AM.png Screen_shot_2011-04-28_at_8.07.27_AM.png added
- File Screen_shot_2011-04-28_at_8.08.15_AM.png Screen_shot_2011-04-28_at_8.08.15_AM.png added
I received another notification message today with errant HTML characters. Actually, I received two notifications; screenshots of both are attached.
Updated by Raymond Hoh over 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?
Updated by Raymond Hoh over 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.
Updated by Matt Gold over 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....
Updated by Raymond Hoh over 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.
Updated by Boone Gorges over 13 years ago
Ray - FYI: http://plugins.trac.wordpress.org/changeset/380712
Thanks!