I’ve been working around the single quote issue for quite a while now. There doesn’t seem to be much on the forums on a fix, just the “\” work-around.
I would love to see a fix for this issue, and a category problem I’ve been experiencing for about the same period of time/ All posts are placed in “uncategorized” no matter what box I check. No error messages reported, just no category. Both the single quaotes and category problems have been affecting my site since the beginning of April.
wp-mail.php ought to include addslashes() to properly escape quotes from the body text of the email. It does not currently do this.
Spinningmud,
You may have already tried this, but I once had a similar problem with the categories and found that deleting then recreating them resolved the issue for me. Fortunately I was still new to WP and had under 100 postings so it wasn’t as painful as it could have been. You might try deleting just one and re-creating to see if that’s it. Hope this helps.
Has this always been an issue with WP (since mail posting has existed)? I find it hard to believe that what seems to be a trivially simple fix (since the escaping is already done during regular posts) hasn’t been fixed yet…
Servant,
I’m going to try you suggestion. I have a pile of categories and posts, but it’s worth a try.
watersedge: Off hand, I don’t know if this has always been a problem. I’ve only recently started helping troubleshoot post-by-email. I don’t do it, myself. Several blog by email solutions exist. If you find one to be superior, please let us know.
Deleting categories did nothing for me. I still can’t get the category to show up with the post.
Thanks. I’ll take a look.
Well, for those of you who came here with the same problem, here’s what i did:
Open wp-mail.php and change the following lines:
$subject = trim(str_replace(get_settings('subjectprefix'), '', $subject));
and
$content = trim($content);
to
$subject = addslashes(trim(str_replace(get_settings('subjectprefix'), '', $subject)));
and
$content = addslashes(trim($content));
Respectively.
What watersedge proposed here worked perfectly for me. Thanks!