Skip to content

[Bug] Chat Censors Messages Incorrectly #4982

@AnabolicsAnonymous

Description

@AnabolicsAnonymous

UNIT3D Version

9.1.6

PHP & Platform

8.4.5 - Ubuntu 20.04

Laravel verion

12.26.4

Have you done this?

  • I am willing to share my stack trace and logs
  • I can suggest a fix as a Pull Request

Expectation

When a user selects censor chatbox messages under their settings, they would expect that the chatbox would censor all messages with swear words.

Description

Instead, the user that enabled censor chatbox messages gets their messages "censored" since the censoring happens on message sending instead of message loading. It adds the html to censor their message but it doesn't get hidden since the html gets escaped and the style doesn't currently exist anyways.

What should happen is the chatbox needs to load the swear words and the user's censor setting then properly censor all messages client side instead of processing the censors server side.

Example of the users message with the censor setting enabled:

<span class='censor'>crap</span>

Stack trace & logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions