From c48323994c33c4398b4ae92744bff1d9246a0344 Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Mon, 13 Feb 2017 17:59:01 +0100 Subject: Properly URL-encode the JID, needed for IRC transports --- scripts/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/main.js b/scripts/main.js index d0e996e..5c4e9c4 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -48,6 +48,10 @@ key_prefix = "muc."; } + var jid_parts = display_data.jid.split("?"); + jid_parts[0] = encodeURIComponent(jid_parts[0]) // URL-encode the JID only + display_data.jid = jid_parts.join("?"); + // TODO: proper error checking / display / Creation of invitations if (jid.search("@") <= 0) return {jid:"", name: "Somebody"}; -- cgit 1.4.1