jonleighton/poltergeist — pull request #369 by yaauie (2013-08-06 06:23:15+00:00)
Title: Fix url escaping

First, I think this is an ugly patch, but it is a temporary one that should
survive an upstream fix to PhantomJS with only a small performance penalty.

@jredburn [wrote](https://github.com/jonleighton/poltergeist/issues/349#issuecomment-21148290)

> Is it expected behavior that PhantomJS's `window.location.toString()` will
> return a non-escaped URL?

I don't believe this is the case. In every browser I test with locally, that
command in a console yields a properly-escaped URL. The fact that it does
not in PhantomJS is surprising.