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

Inconsistent encoding and decoding of string array params #867

Closed
danhooper opened this issue Nov 6, 2020 · 3 comments · Fixed by ui-router/core#703
Closed

Inconsistent encoding and decoding of string array params #867

danhooper opened this issue Nov 6, 2020 · 3 comments · Fixed by ui-router/core#703

Comments

@danhooper
Copy link

danhooper commented Nov 6, 2020

When a parameter is defined as an array and a string depending on the number of items in the array the strings within the list may be encoded or may not be.

See https://stackblitz.com/edit/uirouter-angular-string-array for a stackblitz that replicates the issue.

I think all of the string parameters should be URL encoded/decoded.

When there is a single item the items are URL encoded/decoded properly. When there is more than one item, none are URL encoded/decoded.

This may be a similar issue as ui-router/core#534 and #340

@christopherthielen
Copy link
Member

Was this a regression?

@christopherthielen
Copy link
Member

Not a regression. I'm shocked this bug has existed for this long, thanks for the nice reproduction.

@danhooper
Copy link
Author

Thanks for the great library, we've been using it on one of my projects for probably 5 years across AngularJS to a hybrid app and now just Angular.

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

Successfully merging a pull request may close this issue.

2 participants