Handle formula URLs with query parameters.  This is useful for fetching
formulas from cgit repositories, which uses ?h= to choose branches.