Skip to content

Commit

Permalink
[fixed] URI escape path components with special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Jun 19, 2015
1 parent 8b81218 commit 4e2ca3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/__tests__/URLUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ describe('formatPattern', function () {
expect(formatPattern(pattern, { id: 'alt.black.helicopter' })).toEqual('comments/alt.black.helicopter/edit');
});
});

describe('and some params contain special characters', function () {
it('returns the correct path', function () {
expect(formatPattern(pattern, { id: '?not=confused&with=query#string' })).toEqual('comments/%3Fnot%3Dconfused%26with%3Dquery%23string/edit');
});
});
});

describe('when a pattern has one splat', function () {
Expand Down

0 comments on commit 4e2ca3c

Please sign in to comment.