probably fix html injection on the janky chat page

This commit is contained in:
Holly Stubbs 2022-02-22 11:00:11 +00:00
parent d8f363e4be
commit 8080cd353b
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E

View file

@ -50,7 +50,7 @@ module.exports = function(CurrentUser, CurrentPacket) {
// Write chat message to stream asociated with chat channel
global.StreamsHandler.sendToStream(CurrentPacket.target, osuPacketWriter.toBuffer, CurrentUser.uuid);
if (CurrentPacket.target == "#osu")
global.addChatMessage(`${CurrentUser.username}: ${CurrentPacket.message}`);
global.addChatMessage(`${CurrentUser.username}: ${CurrentPacket.message.replaceAll("<", "&lt;").replaceAll(">", "&gt;")}`);
botCommandHandler(CurrentUser, CurrentPacket.message, CurrentPacket.target);
return;