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

query params with '/' cause state to load twice #2172

Closed
quoideneuf opened this issue Aug 14, 2015 · 5 comments
Closed

query params with '/' cause state to load twice #2172

quoideneuf opened this issue Aug 14, 2015 · 5 comments
Labels
Milestone

Comments

@quoideneuf
Copy link

This is an issue that appears to only affect 0.2.15.

When the ui-sref directive passes a query param containing a slash, the controller fires twice. The second time the stateParam has the slashes escaped.

Compare the "foo" and "bar" states in this plunker:

http://plnkr.co/edit/IbksnWfy6pY3ipl7S3Qp?p=preview

@billforward-alex
Copy link

I'll throw onto this issue some sample output from that plunkr.

I am in the Foo state.
If I navigate to the Bar state…
stateChangeStart and stateChangeSuccess fire twice.

Start:   home.foo{"param":"here_there"} -> home.bar{"param":"/here/there"}
Success: home.foo{"param":"here_there"} -> home.bar{"param":"/here/there"}
Start:   home.bar{"param":"/here/there"} -> home.bar{"param":"%2Fhere%2Fthere"}
Success: home.bar{"param":"/here/there"} -> home.bar{"param":"%2Fhere%2Fthere"}

Note that on the second attempt, it navigates to some URI-encoded version of the Bar state.

I am in the [URI-encoded version of the] Bar state.
If I navigate to the Foo state…
stateChangeStart and stateChangeSuccess fire just once.

Start:   home.bar{"param":"%2Fhere%2Fthere"} -> home.bar{"param":"/here/there"}
Success: home.bar{"param":"%2Fhere%2Fthere"} -> home.bar{"param":"/here/there"}

Curiouser and curiouser.

@eddiemonge eddiemonge added the bug label Aug 18, 2015
@adematte
Copy link

adematte commented Oct 2, 2015

I can confirm this issue appeared in 0.2.15. We had to revert to 0.2.14 for now.

@ebourgeois
Copy link

Is there an ETA for a fix on this issue?

@RichardM99
Copy link

I am also experiencing this issue.

@christopherthielen
Copy link
Contributor

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

7 participants