From e409148d11080ca05d6c93b8fb2f33f96ce74b25 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sun, 23 Oct 2011 06:25:34 +0200 Subject: [PATCH] Fix upload to deeper namespaces with new AJAX uploader Now params_toarray() correctly decodes parameters on parsing query strings --- lib/scripts/media.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index aa369657d..f76fd4065 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -682,12 +682,17 @@ var dw_mediamanager = { }); }, + /** + * Parse a URI query string to an associative array + * + * @author Kate Arzamastseva <pshns@ukr.net> + */ params_toarray: function (str) { var vars = [], hash; var hashes = str.split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); - vars[hash[0]] = hash[1]; + vars[decodeURIComponent(hash[0])] = decodeURIComponent(hash[1]); } return vars; }, -- GitLab