Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Sir Osis of Liver on August 29, 2021, 12:54:36 AM

Title: Very minor smiley bug
Post by: Sir Osis of Liver on August 29, 2021, 12:54:36 AM
Not something to lose sleep over, but one of my members posted this -

  (September 7 or 8)

You can see the result. ;)
Title: Re: Very minor smiley bug
Post by: Antechinus on August 29, 2021, 12:57:52 AM
That one has been around since 1.1.x. :D
Title: Re: Very minor smiley bug
Post by: Arantor on August 29, 2021, 02:36:44 AM
What exactly would you like it to do other than reading minds to know that shouldn't be processed as a smiley?

You have choices:
* change the smiley code away from 8)
* change the option for no smileys
* wrap it in the nobbc tag

But this is a problem most of the forum systems have had one way or another over the years. Mind-reading or being able to infer from context are a little bit out of scope.
Title: Re: Very minor smiley bug
Post by: Antechinus on August 29, 2021, 02:47:08 AM
I just put a space between any dodgy smileys and the closing bracket.
So (September 7 or 8 )
Title: Re: Very minor smiley bug
Post by: landyvlad on August 29, 2021, 10:35:31 PM
Yeah that's what I do too, but teh best way to prevent this is to redefine the shortcode for the smiley.

eg instead of
8)
use :8):
That is use a semicomon to start and end each shortcode.  Well that's one option anyway.
Title: Re: Very minor smiley bug
Post by: Steve on August 30, 2021, 08:07:58 AM
Keeping in mind that will break any previous intentional posting of the 8) but it does solve the problem for the future. All my smileys are in enclosed in colons ...
Title: Re: Very minor smiley bug
Post by: Antechinus on August 30, 2021, 04:16:24 PM
What happens if someone posts this?
:8):)Is that going to render as :8 ) :) once it is parsed?
Title: Re: Very minor smiley bug
Post by: Arantor on August 30, 2021, 04:41:12 PM
Smileys are parsed by length, longest first, then it's somewhat indeterminate exactly what will happen after that, but if :8):) is the string and :8): is a known smiley, you'll get smiley-followed-by-closing-parenthesis because :8): will be parsed first in its entirety.
Title: Re: Very minor smiley bug
Post by: Antechinus on August 30, 2021, 04:52:00 PM
Ok. That is the desired result, so good.
Title: Re: Very minor smiley bug
Post by: Steve on August 30, 2021, 06:40:10 PM
Darn! Arantor beat me to it ... like I knew that ...  :P