Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix() apostrophe in url #16098

Closed
wants to merge 1 commit into from

Conversation

dmartres
Copy link

bug fix on $location service in case that url contains apostrophes

@gkalpak
Copy link
Member

gkalpak commented Jul 11, 2017

Thx for the PR, @dmartres!

From a quick look, I don't think the issue is specific to apostrophe. The main problem seems to be that we are comparing self.url() to lastBrowserUrl, but lastBrowserUrl can be set from different sources, not always with the same encoding/decoding. I think it boils down to two main cases:

  • In some places, we set lastBrowserUrl to location.href (which is undecoded).
  • In other places we set lastBrowserUrl to a value indirectly based on $location.$$url, which is passed through decodeURIComponent.

IMO, we should address the issue at its core and always use the same encoding/decoding when setting lastBrowserUrl (even if that will be a larger undertaking).

@dmartres, would you like to take a stab at it?

@dmartres
Copy link
Author

You're Right, but now I can't work on that :( . Should I report this as an issue?
Perhaps someone can take a look based on this discussion.

@gkalpak
Copy link
Member

gkalpak commented Jul 11, 2017

Yes, please 😃

@gkalpak
Copy link
Member

gkalpak commented Jul 12, 2017

Thx for opening the issue. Closing this.

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

Successfully merging this pull request may close these issues.

None yet

3 participants