Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.segmentCoded([…]) does not encode slashes #223

Closed
bradleyayers opened this issue Jun 29, 2015 · 2 comments
Closed

.segmentCoded([…]) does not encode slashes #223

bradleyayers opened this issue Jun 29, 2015 · 2 comments
Labels

Comments

@bradleyayers
Copy link

The problem lies with this usage:

> URI("/").segmentCoded(["fo/o", "bar"]).toString()
"/fo/o/bar"

I would have expected it to behave as:

> URI("/").segmentCoded(["fo/o", "bar"]).toString()
"/fo%2Fo/bar"

Interesting it's fine when not using an array argument, and instead using multiple invocations:

URI("/").segmentCoded("fo/o").segmentCoded("bar").toString()
"/fo%2Fo/bar"
@rodneyrehm
Copy link
Member

for some reason array input was decoded instead of encoded. obviously a bug. fix is in master. thank you!

@bradleyayers
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants