From 047fc8e6ea509c864289d074889243ffc2f4685f Mon Sep 17 00:00:00 2001 From: Artem Shoobovych Date: Thu, 17 Jan 2013 17:20:55 +0200 Subject: [PATCH] Fixed bug when nested objects within POST request contained excessive characters. --- .gitignore | 1 + index.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3c3629e..eb79dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +.idea diff --git a/index.js b/index.js index 14f199b..fa2979d 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,7 @@ function parse(parts, parent, key, val) { function merge(parent, key, val){ if (~key.indexOf(']')) { - var parts = key.split('[') + var parts = key.split(/[\[\]]/) , len = parts.length , last = len - 1; parse(parts, parent, 'base', val); diff --git a/package.json b/package.json index 1d85265..64f21ed 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "qs", "description": "querystring parser", - "version": "0.5.3", + "version": "0.5.3-1", "keywords": ["query string", "parser", "component"], "repository": { "type" : "git",