Parse unusual editor URIs with no domain in the way users expect
Summary:
Fixes T6106. See that task for additional dicussion. Specific issue is that if a URI has no path, but does contain a "/" in the query string, parse_url() does something unexpected.
$ php -r "var_dump(parse_url('idea://open?a=/'));" array(3) { ["scheme"]=> string(4) "idea" ["host"]=> string(7) "open?a=" ["path"]=> string(1) "/"
Instead, adjust these URIs so we get a more expected result.
Test Plan: Added failing unit tests and made them pass.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T6106
Differential Revision: https://secure.phabricator.com/D10515