News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Very minor smiley bug

Started by Sir Osis of Liver, August 29, 2021, 12:54:36 AM

Previous topic - Next topic

Sir Osis of Liver

Not something to lose sleep over, but one of my members posted this -

  (September 7 or 8)

You can see the result. ;)
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Antechinus

That one has been around since 1.1.x. :D
Sources code: making easy front end changes difficult since 1873 :P

Mods & Themes | Revamped theme for this site | Dark theme for this site | GitHub for n00bz

Arantor

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.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

Antechinus

I just put a space between any dodgy smileys and the closing bracket.
So (September 7 or 8 )
Sources code: making easy front end changes difficult since 1873 :P

Mods & Themes | Revamped theme for this site | Dark theme for this site | GitHub for n00bz

landyvlad

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.
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it

Steve

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 ...
Please do not PM me for support.

Antechinus

#6
What happens if someone posts this?
:8):)Is that going to render as :8 ) :) once it is parsed?
Sources code: making easy front end changes difficult since 1873 :P

Mods & Themes | Revamped theme for this site | Dark theme for this site | GitHub for n00bz

Arantor

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.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

Antechinus

Ok. That is the desired result, so good.
Sources code: making easy front end changes difficult since 1873 :P

Mods & Themes | Revamped theme for this site | Dark theme for this site | GitHub for n00bz

Steve

Darn! Arantor beat me to it ... like I knew that ...  :P
Please do not PM me for support.

Advertisement: