From 07109c5ae40f94c7cee1acc663f94b3874fd2341 Mon Sep 17 00:00:00 2001 From: F16Gaming Date: Sun, 20 May 2012 19:41:06 +0200 Subject: [PATCH] FIXED: ChatManager.SendMessage should now properly escape pipe characters in the message. --- ChatManager.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ChatManager.lua b/ChatManager.lua index f95cb85..d5aa1ec 100644 --- a/ChatManager.lua +++ b/ChatManager.lua @@ -108,7 +108,10 @@ end function CM:SendMessage(msg, channel, target, isBN) isBN = isBN or false if not self.Settings.LOCAL_ONLY then - msg = ("[%s] %s"):format(C.Name, tostring(msg)) + -- Sanitize message + --msg = msg:gsub("|*", "|") -- First make sure every pipe char is alone (This is probably not needed) + msg = tostring(msg):gsub("|", "||") -- Escape the pipe characters + msg = ("[%s] %s"):format(C.Name, msg) if channel == "SMART" then if GT:IsRaid() then channel = "RAID" -- 1.7.9.5