diff options
Diffstat (limited to 'lib/scripts/media.js')
-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; }, |