From 1793e93ea1b831329b580c7a5aa4fb982c665417 Mon Sep 17 00:00:00 2001 From: mluto Date: Sun, 31 Mar 2013 11:30:01 +0200 Subject: [PATCH] Decode the sessionID before sending it to the server since our separator ',' gets encoded --- src/static/js/pad.js | 2 +- src/static/js/timeslider.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index e5e6e95f..5cc02d87 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -191,7 +191,7 @@ function handshake() createCookie("token", token, 60); } - var sessionID = readCookie("sessionID"); + var sessionID = decodeURIComponent(readCookie("sessionID")); var password = readCookie("password"); var msg = { diff --git a/src/static/js/timeslider.js b/src/static/js/timeslider.js index eb3703d9..cd98dead 100644 --- a/src/static/js/timeslider.js +++ b/src/static/js/timeslider.js @@ -116,7 +116,7 @@ function init() { //sends a message over the socket function sendSocketMsg(type, data) { - var sessionID = readCookie("sessionID"); + var sessionID = decodeURIComponent(readCookie("sessionID")); var password = readCookie("password"); var msg = { "component" : "pad", // FIXME: Remove this stupidity!