Subject: Re: [RFD] gitweb: href() function to generate URLs for CGI

From: Jakub Narebski <[email-masked]>
Date: Wed, 23 Aug 2006 00:39:25 +0200

Junio C Hamano wrote:

> Jakub Narebski <[email-masked]> 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