File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ var Path = {
112112 * in the given path, null if the path contains no query string.
113113 */
114114 extractQuery : function ( path ) {
115- var match = decodeURL ( path ) . match ( queryMatcher ) ;
115+ var match = path . match ( queryMatcher ) ;
116116 return match && qs . parse ( match [ 1 ] ) ;
117117 } ,
118118
Original file line number Diff line number Diff line change @@ -229,6 +229,10 @@ describe('Path.extractQuery', function () {
229229 it ( 'properly handles arrays' , function ( ) {
230230 expect ( Path . extractQuery ( '/?id%5B%5D=a&id%5B%5D=b' ) ) . toEqual ( { id : [ 'a' , 'b' ] } ) ;
231231 } ) ;
232+
233+ it ( 'properly handles encoded ampersands' , function ( ) {
234+ expect ( Path . extractQuery ( '/?id=a%26b' ) ) . toEqual ( { id : 'a&b' } ) ;
235+ } ) ;
232236 } ) ;
233237
234238 describe ( 'when the path does not contain a query string' , function ( ) {
You can’t perform that action at this time.
0 commit comments