I can’t edit the top portion anymore but please see the second blockquote that shows what I am talking about, not the first block quote.
I too had this issue and found countless other posts dated many years ago with no solution. I am using bbpress v2.5.4 and buddypress v2.1.1 on WordPress v4.1. I “resolved” this by editing my functions.php file within the bbpress plugin directory and replacing any character values with a blank. Good enough for me. This “solution” IS NOT RECOMMENDED as any update to bbpress is more than likely to overwrite it. Unless you don’t mind going back in and remembering to re-hack it after each update. No doubt it can be done better. The client just requested I get rid of the code values. Without further to do…
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.
Looking forward to any other helpful input. No need to remind me how better you are at coding. 🙂
Any other updates on this? I have a forum on “Podcasters’ Society,” and the emails from bbPress turn that apostrophe into a catastrophe.
Oddly, it’s only emails from bbPress that do this. Other site emails are fine.
There are (at least) a couple of tickets on this in the bbPress trac, no. 2722 and no. 2865.
No. 2865 has a patch marked “under consideration”. In case it helps anybody, we’ve wrapped this patch 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.
The plugin won’t remove stray HTML or CSS in forum posts. Rogue markup like this can be caused by cut-and-paste operations in TinyMCE, aka the Visual Editor, if you have it enabled in bbPress. If you’re having these problems, we have another free plugin called “Forum Beginner Posts” in the repository. It enables TinyMCE for bbPress in paste-as-text mode by default.
Hi, the apostrophe (simple quote) was displayed as ' ; in the email subject so I fixed this by adding this line:
$topic_title = mb_convert_encoding($topic_title, 'UTF-8', 'HTML-ENTITIES');
in myrsite\wp-content\plugins\bbpress\includes\common\functions.php, lines 1094 and 1252 (bbpress 2.5.12). Between these 2 lines:
$topic_title = strip_tags( bbp_get_topic_title( $topic_id ) );
$topic_title = mb_convert_encoding($topic_title, 'UTF-8', 'HTML-ENTITIES');
$topic_content = strip_tags( bbp_get_topic_content( $topic_id ) );
I’m a beginner with php so maybe there is a better way to achieve this, but worked great for me 🙂