XMPP invitation landing page, without javascript
Properly URL-encode the JID, needed for IRC transports
| -rw-r--r-- | scripts/main.js | 4 |
1 files changed, 4 insertions, 0 deletions
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"}; |