diff --git a/client/jsFiles/SEAWebClientCommunication.js b/client/jsFiles/SEAWebClientCommunication.js index 641b985..27f8f31 100644 --- a/client/jsFiles/SEAWebClientCommunication.js +++ b/client/jsFiles/SEAWebClientCommunication.js @@ -247,9 +247,10 @@ function updateValues(message, src) { function reqJSON(s, url, successHandler, errorHandler) { var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); + url = encodeURI(url); if (debugCommunication) { - console.log("%cto server (reqJSON): " + url, - "color:white;background:lightgreen"); + console.log("%cto server (reqJSON): %s", + "color:white;background:lightgreen", url); } xhr.open('get', url, true); xhr.onreadystatechange = function() { @@ -273,9 +274,10 @@ function reqJSON(s, url, successHandler, errorHandler) { function reqJSONPOST(s, url, parameters, successHandler, errorHandler) { var xhr = typeof XMLHttpRequest != 'undefined' ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); + url = encodeURI(url); if (debugCommunication) { - console.log("%cto server (reqJSON): " + url, - "color:white;background:lightgreen"); + console.log("%cto server (reqJSON): %s", + "color:white;background:lightgreen", url); } xhr.open('post', url, true); xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");