From e2b3a8dbbf89d66483633ff52ce37646f40eb90e Mon Sep 17 00:00:00 2001 From: Whatstone <166147148+whatston3@users.noreply.github.com> Date: Sun, 20 Oct 2024 09:45:51 -0400 Subject: [PATCH] Chatsan fixes to emote entries ending with letters. (#2292) * add periods to chatsan entries ending with letters * Move emote sanitization above cap/punct san. --- Content.Server/Chat/Systems/ChatSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index a582bfe80b0..8e4509d7115 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -756,6 +756,8 @@ private string SanitizeInGameICMessage(EntityUid source, string message, out str var newMessage = message.Trim(); newMessage = SanitizeMessageReplaceWords(newMessage); + _sanitizer.TrySanitizeOutSmilies(newMessage, source, out newMessage, out emoteStr); // Frontier: moved up from bottom of function + if (capitalize) newMessage = SanitizeMessageCapital(newMessage); if (capitalizeTheWordI) @@ -763,8 +765,6 @@ private string SanitizeInGameICMessage(EntityUid source, string message, out str if (punctuate) newMessage = SanitizeMessagePeriod(newMessage); - _sanitizer.TrySanitizeOutSmilies(newMessage, source, out newMessage, out emoteStr); - return newMessage; }