MyBB Community Forums

Full Version: Messages form some users contain [font] tag
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I have the latest version of Mybb and my forum has been working without problems since 10 years ago.

In the last few months I have noticed that posts coming from two different users have a [font] tag inside. 
[attachment=45688]

After some investigations I found that first user used to write his message in a Google Translate extension for Chrome (I don't know if his story is 100% correct) and after copy / paste the content in the desktop version of my MyBB forum. Stopping this way of writing solved the problem.

The second user told me that his posts were written from both mobile and desktop, using different themes (Square Theme for Desktop / MyBB Go Mobile for phone) and he also used to copy / paste text from Google Translate extension on Chrome desktop. However, even when he wrote directly in forum from the mobile phone or desktop the tags [font]  were still present. So I was forced to manually edit every post:

If I press "Edit" in the user post, the [font] tags disappears:
[attachment=45689]

In edit mode if I press "Update Post" without editing anything, I see no [font] tags, so the problem is solved:
[attachment=45690]

How to avoid this workaround for every post of this user or others like him and why MyBB shows that [font] tag?
Put the editor in source mode by default so when they copy and then paste over the editor does not pick up color, font, size, etc.

You will need to navigate to your current in use templates for your specific skin. From there go to the bottom Ungrouped Templates —> codebuttons, find:
	MyBBEditor = $("#{$bind}").sceditor("instance");
	{$sourcemode}

and replace with this:
	MyBBEditor = $("#{$bind}").sceditor("instance");
	//{$sourcemode}
	MyBBEditor.sourceMode(true);
Thanks! Can be a solution but editing in source mode is risky for users that have zero knowledge in html.
For instance, when they want to reply they will see [quote] tags not text borders and their reply will be written inside the [quote] not outside because the average people don't know anything about coding. I'm jus thinking...
Anything inside [ or ] is not html it is simply MyCode.

I'm sure they will get the hang of it eventually, this has been the only thing I've found as a solution to copy/paste problem unless you would like to specify to your users that when they paste they need to use the "paste as plain text" option if they have it.
I found the cause!
The user used to type from a Microsoft Natural ergonomic keyboard 4000, connected to his notebook, and this kind of keyboard comes with a proprietary app. So replying in a MyBB forum via this keyboard, without using copy/paste functions, just typing, generates multiple [font] tags inside the text....