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)
Thu, Dec 19, 5:25 PM
Unknown Object (File)
Thu, Dec 12, 10:49 PM
Unknown Object (File)
Thu, Dec 12, 10:49 PM
Unknown Object (File)
Thu, Dec 12, 10:49 PM
Unknown Object (File)
Mon, Dec 9, 7:05 PM
Unknown Object (File)
Wed, Dec 4, 3:34 PM
Unknown Object (File)
Nov 19 2024, 1:56 PM
Unknown Object (File)
Nov 14 2024, 8:08 PM
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.