From 8fff5ee8290db26a98b9c685659489a2cefcc0dc Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 18 Dec 2016 18:06:47 +0200 Subject: [PATCH] Strip control characters from notifications --- client/js/lounge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/lounge.js b/client/js/lounge.js index 8d1179a5..bbb69660 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -1136,7 +1136,7 @@ $(function() { if (msg.type === "message") { title += " says:"; } - body = msg.text.replace(/\x02|\x1D|\x1F|\x16|\x0F|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?/g, "").trim(); + body = msg.text.replace(/\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|[\x00-\x1F]|\x7F/g, "").trim(); } try {