MyBB Community Forums
Syndication and weird chars - Printable Version

+- MyBB Community Forums (
+-- Forum: Development (
+--- Forum: MyBB 1.8 Development (
+---- Forum: 1.8 Bugs and Issues (
+---- Thread: Syndication and weird chars (/thread-233814.html)

Syndication and weird chars - Crazycat - 2021-10-06

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

RE: Syndication and weird chars - Omar G. - 2021-10-14

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 ?

RE: Syndication and weird chars - Crazycat - 2021-10-14

You can have an example with,20&limit=15, 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:,20&limit=15

RE: Syndication and weird chars - Omar G. - 2021-10-15

Your file seems to be removing é, I think there should be a better approach even if it is more complicate.

RE: Syndication and weird chars - Crazycat - 2021-10-15

Oh, you're right, I didn't notice that. The printable table is really small, I'll look into another way