improved handling of malformatted urls in PhpBrowser