MyBB Community Forums

Full Version: Syndication and weird chars
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I manage a technical forum where often my users post scripts or snippets, and they sometime contain weird characters (control code).
No trouble with the forum itself but it brokes the syndication feed with some readers.

So, the solution I found was to remove non-printable chars from the message:

Modified line:
$items[$post['tid']]['description'] = preg_replace('/[[:^print:]]/', '', $parsed_message);

PR #4462
The solution you pushed seems unpractical. Surely there should be a more optimal approach.

Could you share some example here so we can test with it ?

Also, which browsers or services seem to be break ?
You can have an example with, using firefox or chrome.

Error displayed with Chrome: This page contains the following errors: error on line 298 at column 26: Input is not proper UTF-8, indicate encoding ! Bytes: 0x03 0x30 0x34 0x26

My modified syndication.php gives correct result:
Your file seems to be removing é, I think there should be a better approach even if it is more complicate.
Oh, you're right, I didn't notice that. The printable table is really small, I'll look into another way