glimesh.tv icon indicating copy to clipboard operation
glimesh.tv copied to clipboard

🧹 Sanitize characters in chat messages

Open haydenmc opened this issue 4 years ago • 3 comments

This is probably a non-trivial challenge, but we may want to avoid messages like this that tend to get spammed when people 'stress test'. Or at least we should make sure it doesn't break our design/layout.

garbled text busting out of the div

haydenmc avatar Sep 29 '20 19:09 haydenmc

@mja00 Could you provide a text sample of this memery, elixir has great support for codepoints and i can probably strip this type of thing out on message creation

Eein avatar Apr 28 '21 05:04 Eein

@Eein So that hot garbage I spewed into chat was Zalgo text, and here's an example: ȟ̵̢͇̰̹͚̙̗̤̖̥͔̹̈́a̵̢̫̳̣̲̝̍̄͑́̓̒̽͛̒̃̒̚͠͝͝h̴͚̓̿͐̑͗a̴̡̗͍̱̣̳̦̲̫͈̥͛̃̀̐͜͝h̵͉̟̲̜̔̈́̑͊̋̽̋̄̕ͅe̷̡̺̦̳̙̰̔͐̂̅̍̍̆̃ḩ̵͓̗̮͇͎̯͔͕̺̻͖͑͂̔͐̌͐͌̋̌̈̕͜͠e̴̱͙̒̂̇͜͠

mja00 avatar Apr 28 '21 13:04 mja00

It's worth noting GitHub allows these characters as well:

image

I think we should be hesitant to actually prevent, change, or sanitize these messages. However I agree we should not let any chat messages extend past the boundaries of the message, especially if it prevents moderator action.

clone1018 avatar Apr 28 '21 13:04 clone1018