From: Junio C Hamano Date: Thu, 05 Apr 2007 10:38:49 GMT Subject: Re: [PATCH] gitweb: Support comparing blobs (files) with different names Message-ID: <7vircbqf5y.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <200704042327.49632.jnareb@gmail.com> Jakub Narebski writes: > As to browsers: Mozilla 1.7.12 implements RFC2183 correctly, although for > example shows %0A / \n as a strange symbol in "save as" dialog, created > file has embedded newline in filename, as it should. But both Lynx 2.8.5, > and ELinks 0.10.3 do not implement it fully and without errors. > > So that is why we have: > > # It not worth potential problems to try to carry newlines > # in the header; it is just _suggested_ filename > $filename =~ s/[[:cntrl:]\n\r]/_/g; I think the logic in the comment is very sane, although I am not sure if saying \n \r when you say :cntrl: is necessary.