Page MenuHomePhabricator

Fix `/tag/aa%20bb` project URIs
ClosedPublic

Authored by epriestley on Oct 12 2015, 11:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 15, 9:37 AM
Unknown Object (File)
Sat, Jan 11, 7:20 PM
Unknown Object (File)
Thu, Dec 26, 11:48 AM
Unknown Object (File)
Thu, Dec 26, 12:45 AM
Unknown Object (File)
Tue, Dec 24, 3:21 PM
Unknown Object (File)
Fri, Dec 20, 1:30 PM
Unknown Object (File)
Dec 20 2024, 6:55 AM
Unknown Object (File)
Dec 17 2024, 8:01 AM
Subscribers
None

Details

Summary

Ref T9551. To set things up:

  • Name a project aa bb. This will have the tag aa_bb.
  • Try to visit /tag/aa%20bb.

Here's what happens now:

  • You get an Aphront redirect error as it tries to add the trailing /. Add phutil_escape_uri() so that works again.
  • Then, you 404, even though this tag is reasonably equivalent to the real project tag and could be redirected. Add a fallback to lookup, resolve, and redirect if we can find a hit for the tag.

This also fixes stuff like /tag/AA_BB/.

Test Plan

Visited URIs like /tag/aa%20bb, /tag/aa%20bb/, /tag/Aa_bB/, etc. None of them worked before and now they all do.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix `/tag/aa%20bb` project URIs.
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.Oct 12 2015, 11:58 PM
This revision was automatically updated to reflect the committed changes.