Homec4science

Parse unusual editor URIs with no domain in the way users expect

Authored by epriestley <git@epriestley.com> on Sep 18 2014, 17:24.

Description

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

Details

Committed
epriestley <git@epriestley.com>Sep 18 2014, 17:24
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUecf3526e557f: Support "tel:" protocol in Remarkup
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU6c29d5c8d169: Parse unusual editor URIs with no domain in the way users expect (authored by epriestley <git@epriestley.com>).Sep 18 2014, 17:24