diff --git a/modules/utils/Path.js b/modules/utils/Path.js index ea798b4fd3..aa27911ba7 100644 --- a/modules/utils/Path.js +++ b/modules/utils/Path.js @@ -144,10 +144,10 @@ var Path = { if (existingQuery) query = query ? merge(existingQuery, query) : existingQuery; - var queryString = query && qs.stringify(query); + var queryString = qs.stringify(query, { indices: false }); if (queryString) - return Path.withoutQuery(path) + '?' + queryString; + return Path.withoutQuery(path) + '?' + decodeURIComponent(queryString); return path; }, diff --git a/modules/utils/__tests__/Path-test.js b/modules/utils/__tests__/Path-test.js index 2affc7b0eb..4c6dba7c89 100644 --- a/modules/utils/__tests__/Path-test.js +++ b/modules/utils/__tests__/Path-test.js @@ -322,7 +322,7 @@ describe('Path.withQuery', function () { }); it('merges two query strings', function () { - expect(Path.withQuery('/path?a=b', { c: [ 'd', 'e' ]})).toEqual('/path?a=b&c%5B0%5D=d&c%5B1%5D=e'); + expect(Path.withQuery('/path?a=b', { c: [ 'd', 'e' ] })).toEqual('/path?a=b&c=d&c=e'); }); });