MyBB Community Forums

Full Version: Smilies with emoticonsCompact still being parsed.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After reporting this bug here, I came to know that it was related with the option "emoticonsCompact" in the "codebuttons" template. When emoticonsCompact = true, smilies should have a space before and after in order to be translated to an image, in wysiwyg mode, to avoid things like "http://" to have a smilie in there.

Problem is, even with emoticonsCompact = true, and even with it working in wysiwyg, the smilies in the middle of text are still parsed when posting or clicking preview post, eg. helloSmile.
Have you checked all of the changes mentioned here: https://github.com/samclarke/SCEditor/issues/451 ?
This is not a bug. MyBB's parser ≠ SCEditor's parser. emoticonsCompact is a JS option that can't affect our PHP script.

Our parser does advanced regex checks to make sure that smilies don't break other MyCodes, links, etc. SCEditor's parser isn't that complex, so spaces are required to make sure that smilies don't break anything they can possibly break. We can't make them consistent unless SCEditor creators decide to implement the same advanced regex checks too, which may not be even possible in JS.

IMO we should reject this.
Yes I think so. I replaced the jquery.sceditor.bbcode.min.js with the one on this page, and now the smilies are correctly parsed in the editor's wysiwyg mode. When emoticonsCompact=true, it needs a space before and after the smilie in order for it to be correctly parsed (in the editor). However, this does not seem to apply when posting / previewing. So even though the smilies are not translated to an image in the editor, when emoticonsCompact=true, they are still translated when posting. thisSmileshouldSadnotSmilehappen!
WhySadshouldn'tSadthisSadbeSadallowed?Sad

Why would we make our parsing code worse just to support consistency with SCEditor?
In case it is allowed, simple smilies will cause problems. E.g. :/
In http://, there, ruined. Well, easy fix is to not make them simple. E.g. :-/
But that's not really a fix, just avoiding the problem...
Wrong - as I said earlier, regexes and parse order take care of stuff and links or anything else won't be broken by :/ or any other smilie.

You can check an example here: http://nooo.hol.es/mybb16/showthread.php...d=70#pid70 Or just add :/ yourself in ACP, post and you'll see it won't break any http://

Anyways, rejecting, because we 99% won't change it.