Open marmol-dev opened 9 years ago
Hi all. I just discovered I'm getting this same issue. Any chance to merge in this fix?
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/?_escapedfragment=/users and it was needing abc.com/?_escapedfragment=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);
}
@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.
Solved a bug that provokes that PhantomJS open the urls with the following format: http://example.com/#!//path/to/route