Opened 10 years ago
Closed 9 years ago
#2865 closed defect (bug) (fixed)
Emails for notifications converting characters
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.6 | Priority: | high |
| Severity: | normal | Version: | 2.5.8 |
| Component: | API - Subscriptions | Keywords: | has-patch dev-feedback |
| Cc: |
Description
A user posted a solution to this in the forums, but only for subject lines. This is somewhat his reply was to the topic.
GoTo: yoursite\wp-content\plugins\bbpress\includes\common\functions.php
Between Lines 1090 and 1091 Add:
$search_bbpress_titles = array("&# 039;", "&am p;", "R 11;", "&qu ot;"); // ' & - "
$topic_title = str_replace($search_bbpress_titles, '', $topic_title);
Then add the same two lines further down between Lines 1233 and 1234.
NOTE: You will have to remove the spaces from the $search_bbpress_titles array line as I was unable to post without it parsing that line. Don't know the coding on this form to post properly. Email me if you need the code.
Sorry I am a bit lazy now, so just copying and pasting from this reply
Attachments (1)
Change History (6)
#1
@
10 years ago
- Keywords has-patch dev-feedback added; needs-patch removed
- Milestone changed from Awaiting Review to Under Consideration
#2
@
10 years ago
In case it helps anybody, I've reworked this patch from @thebrandonallen as a plugin for bbPress 2.5.8:
https://wordpress.org/plugins/fix-forum-emails/
This should help to fix problems with HTML entities in notification emails on vanilla bbPress installs. It's intended as a workaround until the issue gets fixed in bbPress core.
Cheers!
#3
@
9 years ago
- Priority changed from normal to high
I can confirm this happens in mail title when the forum contains double quotes as well. This is pretty ugly, and shouldn't last for such a huge & popular plugin ! That really don't help people clicking notification emails.
See the screenshot
I'd be very grateful if you could fix it natively instead of requiring a plugin/patch to install manually !
Thanks :)

The issue here is
wptexturizewhich is added, by filter, tothe_title. For thebbp_get_(forum|topic|reply)_contentfunctions, we remove all filters fromthe_content, and add them to their respectivebbp_get_(forum|topic|reply)_contentfilters. However,the_titleandbbp_get_(forum|topic|reply)_titlefilters don't get the same treatment, so removing all filters frombbp_get_(forum|topic|reply)_titlehas no effect. I'm attaching a patch to fix this, but I'm not sure it's the way we want to go.The big question is, should the
bbp_get_(forum|topic|reply)_titlefunctions be treated the same as thebbp_get_(forum|topic|reply)_contentfunctions by shifting their default filters onto ours?I've also added
wp_specialchars_decodeto convert any entities that were added by the user, since plaintext emails don't decode these.