Subject: Re: gitweb: using quotemeta

From: Jakub Narebski <[email-masked]>
Date: Mon, 02 Oct 2006 02:28:14 +0200

Luben Tuikov wrote:

> --- Junio C Hamano <[email-masked]> wrote:
>> 
>> Ouch, that was a sloppy planning and coding, and sloppier
>> reviewing.  Sorry.
>> 
>> What is the right quoting there?  Just quoting double-quotes?
> 
> I'm not sure.  What undesired character could we have in $filename
> of a snapshot?  The commit ab41dfbfd4f message gives this
> justification: "Just in case filename contains end of line character."
> 
> It looks like $filename is constructed by well defined strings:
> basename($project), $hash and $suffix all of which should be ok.
> 
> I'd say we don't need quotemeta for $filename of snapshot.

But we do need quoting for blob_plain and perhaps blobdiff_plain
views, although not quotemeta, but perhaps the reverse of unescape,
i.e. quote '"', EOLN (end of line) and perhaps also TAB.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git