Page MenuHomePhabricator

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

Authored by epriestley on Oct 12 2015, 11:08 PM.
Tags
None
Referenced Files
F19519087: D14260.id34425.diff
Fri, Jan 16, 1:35 AM
F19516572: D14260.id34425.diff
Thu, Jan 15, 1:34 AM
F19514392: D14260.id34425.diff
Wed, Jan 14, 1:37 AM
F19099793: D14260.id.diff
Dec 4 2025, 9:15 PM
F19092710: D14260.diff
Dec 3 2025, 6:12 PM
F18955017: D14260.diff
Nov 12 2025, 8:24 PM
F18867037: D14260.id.diff
Nov 3 2025, 9:10 PM
F18862148: D14260.diff
Nov 2 2025, 6:14 PM
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
Branch
projslug1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8240
Build 9430: Run Core Tests
Build 9429: arc lint + arc unit

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.