TextChannel:DisplaySystemMessage() does not escape RichText characters

When calling TextChannel:SendAsync(), RichText characters like angle brackets < > or ampersands & are escaped. You can see this when printing TextChatMessage.Text in a TextChannel.OnIncomingMessage callback function:

textChannel.OnIncomingMessage = function(tcm)
	print(tcm.Text)
end
textChannel:SendAsync("Hello <")

Output:

Hello &lt;

This does not occur with TextChannel:DisplaySystemMessage(), and will mess up any RichText formatting done in the OnIncomingMessage callback (or from within the method’s message argument).

image

Read the code and reproduce the issue with the following .rbxm file. Ensure game:GetService("TextChatService").ChatVersion is set to TextChatService.

DisplaySystemMessage doesnt escape RichText tag characters.rbxm (1.4 KB)

4 Likes

Looks like this error pops up sometimes when you test, even if TextChatService.ChatVersion is set to TextChatService.

Just retry until the error doesn’t appear.

Thanks for the report! We’ll follow up when we have an update for you.

2 Likes

I have also been running into this issue. Hopefully it gets fixed soon.

2 Likes