Simple Machines Community Forum

SMF Development => Bug Reports => Topic started by: m4z on September 13, 2019, 12:33:55 PM

Title: Unicode "smartphone emojis" break Preview
Post by: m4z on September 13, 2019, 12:33:55 PM
Tested with this 2.0.15 right here, 2.1rc2, and the Github HEAD of ~2019-09-01.

Entering a Unicode smiley like "🤔" breaks the Preview function, the preview box is just empty and the following error is displayed across all versions I tested:
Quote
The following error or errors occurred while posting this message:
The message body was left empty.

In 2.1, the very first rendering actually works, but if you preview again, it is empty.


Once you delete the emoji from your (original or quoted) text, Preview works again.


The problem seems to be caused by characters from (at least) the following Unicode blocks:

But not from these:
Title: Re: Unicode "smartphone emojis" break Preview
Post by: albertlast on September 13, 2019, 04:38:51 PM
when the preview of quickreplay is used the error didn't happen in 2.1
Title: Re: Unicode "smartphone emojis" break Preview
Post by: m4z on September 13, 2019, 05:18:56 PM
So you're seeing a correct preview and no error message? Only the first time you hit Preview, or does it work every time? (I see the error message every time; the first time I hit Preview, there's a preview, but not when I press Preview again.)

I'm on postgres btw, are you too?
Title: Re: Unicode "smartphone emojis" break Preview
Post by: albertlast on September 14, 2019, 12:43:33 AM
The error appears when i use your way,
but when i use the different way the error didn't appear.
Title: Re: Unicode "smartphone emojis" break Preview
Post by: shawnb61 on October 03, 2019, 02:47:56 AM
I've seen this on:
 - 2.0 pg
 - 2.1 pg
 - 2.1 mysql

I cannot replicate it on a 2.0 mysql (utf8).   

Albertlast is correct, previewing the quickreply works fine.  The above refers to actual posts. 
Title: Re: Unicode "smartphone emojis" break Preview
Post by: shawnb61 on October 03, 2019, 07:00:11 PM
This will be fixed in the upcoming 2.0.16.

This was reported a few times, I am going to close all but this one!
Title: Re: Unicode "smartphone emojis" break Preview
Post by: albertlast on October 04, 2019, 02:08:25 PM
When you do this for 2.1 too,
would be nice that you assign yourself to this issue,
because i was always thinkg about to try my luck
since no one care.
Title: Re: Unicode "smartphone emojis" break Preview
Post by: shawnb61 on October 04, 2019, 02:19:57 PM
Just not addressed yet.  Thanks for logging it here: https://github.com/SimpleMachines/SMF2.1/issues/5804