TextChatService.MessageReceived and TextChatService.SendingMessage replacing '<' and '>' with '& lt;' and '& gt;'

When connecting to either TextChatService.MessageReceived or TextChatService.SendingMessage. the TextChatMessage.Text string has any instance of ‘<’ or ‘>’ replaced with ‘& lt;’ or ‘& gt;’, (with the space removed, Discourse automatically converts the text to < or >)

Repro:

  1. Open a new place, be sure TextChatService.ChatVersion is TextChatService.
  2. create a local script in StarterPlayer with the code:
local TCS = game:GetService("TextChatService")

TCS.MessageReceived:Connect(function(textChatMessage: TextChatMessage)  
	print(textChatMessage.Text)
end)
  1. Type < or > in the chat window, and notice it comes out as ‘& lt;’ or ‘& gt;’

Occurs in Studio and Live Servers

Expected behavior

Intend behavior is to return ‘<’ or ‘>’ when typing a message containing ‘<’ or ‘>’

1 Like