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

Solved: _scaped_fragment_ now doesn't add a slash #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marmol-dev
Copy link

Solved a bug that provokes that PhantomJS open the urls with the following format: http://example.com/#!//path/to/route

@system-check
Copy link

Hi all. I just discovered I'm getting this same issue. Any chance to merge in this fix?

@leohenning
Copy link

I solved this slightly differently. Problem was occurring for me because my urls look like abc.com/#!/users. so it would endup being abc.com/?escaped_fragment=/users and it was needing abc.com/?escaped_fragment=users. Not sure this is the same issue. but I added the following between line 46 and 47

    //if there is a leading / remove it
    if (escapedFragment.substring(0,1) == '/') {
        escapedFragment = escapedFragment.substring(1);
    }

@system-check
Copy link

@leohenning. Yes, I believe it's the same problem. The behavior I saw was similar to the OP, whereby my normal urls had double foreslashes '//', and causing failure. I solved it the same way as the OP by removing the extra slash on line 47, but your solution is safer since it makes fewer assumptions about the incoming escaped fragment. The important question is whether the escaped fragment is always an absolute path, or not. That I'm unsure about atm.

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 this pull request may close these issues.

None yet

3 participants