From 26d313787714ec51a8b74483b74135b4f10c2169 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 25 Sep 2017 20:22:30 +1000 Subject: [PATCH] Prevent being able to use colour codes to bypass swear filters, fixes #388 --- MCGalaxy/Chat/ProfanityFilter.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MCGalaxy/Chat/ProfanityFilter.cs b/MCGalaxy/Chat/ProfanityFilter.cs index f22bf8222..7def51e78 100644 --- a/MCGalaxy/Chat/ProfanityFilter.cs +++ b/MCGalaxy/Chat/ProfanityFilter.cs @@ -89,6 +89,8 @@ namespace MCGalaxy { static string Reduce(string text) { text = text.ToLower(); + text = Colors.Strip(text); + for (int i = 0; i < reduceKeys.Length; i++) text = text.Replace(reduceKeys[i], reduceValues[i]); return text;