Page MenuHomePhabricator

Put rel="noreferrer" on all nonlocal links
ClosedPublic

Authored by epriestley on Apr 6 2014, 2:56 PM.
Tags
None
Referenced Files
F14042802: D8711.diff
Tue, Nov 12, 6:07 AM
F14040266: D8711.id.diff
Mon, Nov 11, 8:35 AM
F14025975: D8711.diff
Thu, Nov 7, 9:36 PM
F14016994: D8711.id20657.diff
Mon, Nov 4, 1:02 PM
F14016374: D8711.id20657.diff
Mon, Nov 4, 8:37 AM
F14016102: D8711.diff
Mon, Nov 4, 5:27 AM
F14015351: D8711.id20671.diff
Sun, Nov 3, 5:44 PM
F14015327: D8711.id20671.diff
Sun, Nov 3, 5:35 PM
Subscribers

Details

Summary

Ref T4342. By default, insert rel="noreferrer" for links. We do not insert this if:

  • The caller provided an explicit "rel" attribute.
  • We recognize the link as an anchor ("#comment-2"), or as local to the current domain ("/path/to/resource").

Otherwise, add it in all cases.

Test Plan

Added and executed unit tests. (The javascript stuff which was touched a little bit has a pile of tests already, too.)

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Put rel="noreferrer" on all nonlocal links.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Apr 7 2014, 5:16 PM
epriestley updated this revision to Diff 20671.

Closed by commit rPHUfd6f1829e353 (authored by @epriestley).