Page MenuHomePhabricator

Make remarkup link generation rules more flexible and consistent
ClosedPublic

Authored by epriestley on Jun 2 2016, 1:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 7:59 PM
Unknown Object (File)
Fri, Apr 12, 4:26 PM
Unknown Object (File)
Mon, Apr 8, 10:28 AM
Unknown Object (File)
Mon, Apr 8, 10:13 AM
Unknown Object (File)
Mon, Apr 8, 7:23 AM
Unknown Object (File)
Mon, Apr 8, 7:23 AM
Unknown Object (File)
Mon, Apr 8, 6:01 AM
Unknown Object (File)
Sun, Apr 7, 3:36 AM
Subscribers
None

Details

Summary

Ref T10903. Ref T6299. This provides better support for same-window Remarkup links (for CORGI) and getting the base URI / current page / anchor behavior correct (for Phame custom domains).

The uri.prefix config setting currently has no callsites and is essentially always wrong for either anchor links or same-domain links, unless you happen to be on the home page. Instead:

  • uri.base: Base URI for /x/y/ links, e.g. https://blog.whatever.com/.
  • uri.here: Base URI for #anchor links, e.g. https://blog.whatever.com/post/whatever/.
  • uri.same-window: Render offsite hyperlinks without target="_blank".

The first two will fix Phame custom domain stuff. The third one will let CORGI links stay in the same window.

Test Plan

Unit tests, see also next diff.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make remarkup link generation rules more flexible and consistent.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Jun 2 2016, 2:23 AM
This revision was automatically updated to reflect the committed changes.