From: Daniel Kinzler Date: Thu, 31 Aug 2006 20:23:50 +0000 (+0000) Subject: use encodeURIComponent() instead of escape() in ajax.js X-Git-Tag: 1.31.0-rc.0~55864 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=430255078768b476d77cf16daf02ff64c33bf7bd;p=lhc%2Fweb%2Fwiklou.git use encodeURIComponent() instead of escape() in ajax.js --- diff --git a/skins/common/ajax.js b/skins/common/ajax.js index e9f4730459..a6876abe78 100644 --- a/skins/common/ajax.js +++ b/skins/common/ajax.js @@ -75,17 +75,17 @@ function sajax_do_call(func_name, args, target) { uri = wgServer + "/" + wgScriptPath + "/index.php?action=ajax"; if (sajax_request_type == "GET") { if (uri.indexOf("?") == -1) - uri = uri + "?rs=" + escape(func_name); + uri = uri + "?rs=" + encodeURIComponent(func_name); else - uri = uri + "&rs=" + escape(func_name); + uri = uri + "&rs=" + encodeURIComponent(func_name); for (i = 0; i < args.length; i++) - uri = uri + "&rsargs[]=" + escape(args[i]); + uri = uri + "&rsargs[]=" + encodeURIComponent(args[i]); //uri = uri + "&rsrnd=" + new Date().getTime(); post_data = null; } else { - post_data = "rs=" + escape(func_name); + post_data = "rs=" + encodeURIComponent(func_name); for (i = 0; i < args.length; i++) - post_data = post_data + "&rsargs[]=" + escape(args[i]); + post_data = post_data + "&rsargs[]=" + encodeURIComponent(args[i]); } x = sajax_init_object(); if (!x) {