diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-10-23 06:25:34 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-10-23 06:25:34 +0200 |
commit | e409148d11080ca05d6c93b8fb2f33f96ce74b25 (patch) | |
tree | 9b3d22a6bb839fba862a5bac13fa44d08e4e2067 /lib | |
parent | 434f59213c7786053b453612347ff83abfeb8b7b (diff) | |
download | rpg-e409148d11080ca05d6c93b8fb2f33f96ce74b25.tar.gz rpg-e409148d11080ca05d6c93b8fb2f33f96ce74b25.tar.bz2 |
Fix upload to deeper namespaces with new AJAX uploader
Now params_toarray() correctly decodes parameters on parsing query
strings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scripts/media.js | 7 |
1 files changed, 6 insertions, 1 deletions
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; }, |