Re: [RFD] gitweb: href() function to generate URLs for CGI
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Aug 22, 2006, 22:39 UTC
- Message-ID
- <ecg12q$3uj$1@sea.gmane.org>
- In-Reply-To
- <7vveokmmpr.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 11 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes: > >> URL for search is created and encoded by browser I think, so search >> for "a = b" generates >> >> gitweb.cgi?p=git.git&a=search&h=HEAD&s=a+%3D+b > > which means href() should generate something similar when it > wants to reproduce what the user queried, doesn't it? I do not > think quoting after joining does, and that is why I asked that > question.
Yes, ot should... but first we would have to convert all the cases of generating URI via esc_param(...) to using href(). That means to extend href() somewhat (-absolute=>1 as special value in href() parameters, or changing href(%) to href(\%;$)?) to be able to generate absolute URI (for example for RSS/OPML).
And the case is not that inconceivable: $project can be anything, and can have ';' and '=' inside. I'm not sure about valid symbolic refs...
Usage of '&' as query parameters separator instead of ';' probably depend on the browser...
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git