File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ function parse_str (str, array) {
11
11
// + input by: Dreamer
12
12
// + bugfixed by: Brett Zamir (http://brett-zamir.me)
13
13
// % note 1: When no argument is specified, will put variables in global scope.
14
+ // + bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/)
15
+ // % note 1: When a particular argument has been passed, and the returned value is different parse_str of PHP. For example, a=b=c&d====c
14
16
// * example 1: var arr = {};
15
17
// * example 1: parse_str('first=foo&second=bar', arr);
16
18
// * results 1: arr == { first: 'foo', second: 'bar' }
@@ -34,8 +36,8 @@ function parse_str (str, array) {
34
36
if ( tmp . length < 2 ) {
35
37
tmp = [ tmp , '' ] ;
36
38
}
37
- key = fixStr ( tmp [ 0 ] ) ;
38
- value = fixStr ( tmp [ 1 ] ) ;
39
+ key = fixStr ( tmp . shift ( ) ) ;
40
+ value = fixStr ( tmp . join ( glue1 ) ) ;
39
41
while ( key . charAt ( 0 ) === ' ' ) {
40
42
key = key . substr ( 1 ) ;
41
43
}
You can’t perform that action at this time.
0 commit comments