From b19fc14b3c92f907bf6685d5ee908d2b94a39f59 Mon Sep 17 00:00:00 2001 From: sprusr Date: Mon, 1 Feb 2016 22:56:37 +0000 Subject: [PATCH] Strip control codes from notifications Fixes erming/shout#628 --- client/js/shout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/shout.js b/client/js/shout.js index 99a89314..40056f82 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -655,7 +655,7 @@ $(function() { favico.badge("!"); if (settings.badge && Notification.permission === "granted") { var notify = new Notification(msg.from + " says:", { - body: msg.text.trim(), + body: msg.text.replace(/\x02|\x1D|\x1F|\x16|\x0F|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?/, "").trim(), icon: "/img/logo-64.png", tag: target });