Blocking emojis won't work

AI-generated summary

Blocking Emojis Won’t Work

A discussion about blocking emojis, specifically the middle finger emoji, reveals a bug in the Discourse system. Chaboi_3000 found that blocking the emoji did not prevent it from being posted via PM. codinghorror explains that blocking a unicode code point and the spelled-out version (:fu:) are different.

sam attempted to block both the emoji and the spelled-out version but was unable to prevent posting. techAPJ implemented a fix for blocking emojis, which can now be blocked via both :fu: and the unicode emoji.

However, Brandon_Martus reported that the fix did not work for them, despite updating their Discourse instance. techAPJ explains that the “block emoji” feature only works server-side and does not currently work for Censor, Require Approval, and Flag features, but plans to implement it for these features as well.

To avoid some problems, I blocked the middle finger emoji. Then, I went to my test account which does not have admin or moderator and is TL2. I used the emoji in a PM to my normal account, and it didn’t block the emoji. Which is a problem.

1 Like

There is a difference between blocking a unicode code point (character) and the spelled-out version :fu:

Not entirely sure which code paths would work here cc @sam but probably will come up again.

4 Likes

Yes I tried blocking both :fu: and the emoji version.

My sock puppet was able to post both times either as emoji codepoint or emoji.

There is some sort of bug here.

@techAPJ can you have a quick look at this.

8 Likes

bump +1 for this.

Running (now) 2 separate Discourse instances and would like to be able to block the FU emoji on both.

4 Likes

We have it on our list, we should get to it in the next 2-4 weeks.

5 Likes

Blocking emoji now works, via:

https://github.com/discourse/discourse/commit/99c6db21e632fd8731ff97f4122cc89a7c0e0257

Both :fu: and the unicode emoji can be blocked.

9 Likes

Updated the sites last night and wasn’t able to get this to work. At first, I thought it was maybe because regex for watched words wasn’t enabled, but ticking that didn’t help either.

The word is :fu : (without the space .. had to add that to bypass meta censor) and is under Censored Words. I also tried under Required Approval, and that didn’t work either.

Do I need to do anything else to get this to work?

Current Version: v2.3.0.beta2 +115

1 Like

I implemented the “block emoji” feature which performs the check server side and blocks the word from being posted. I’ll look into implementing the same for Censor, Require Approval & Flag as well.

8 Likes