File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ var Path = {
112
112
* in the given path, null if the path contains no query string.
113
113
*/
114
114
extractQuery : function ( path ) {
115
- var match = decodeURL ( path ) . match ( queryMatcher ) ;
115
+ var match = path . match ( queryMatcher ) ;
116
116
return match && qs . parse ( match [ 1 ] ) ;
117
117
} ,
118
118
Original file line number Diff line number Diff line change @@ -229,6 +229,10 @@ describe('Path.extractQuery', function () {
229
229
it ( 'properly handles arrays' , function ( ) {
230
230
expect ( Path . extractQuery ( '/?id%5B%5D=a&id%5B%5D=b' ) ) . toEqual ( { id : [ 'a' , 'b' ] } ) ;
231
231
} ) ;
232
+
233
+ it ( 'properly handles encoded ampersands' , function ( ) {
234
+ expect ( Path . extractQuery ( '/?id=a%26b' ) ) . toEqual ( { id : 'a&b' } ) ;
235
+ } ) ;
232
236
} ) ;
233
237
234
238
describe ( 'when the path does not contain a query string' , function ( ) {
You can’t perform that action at this time.
0 commit comments