Re: [PATCH] gitweb: Convert Content-Disposition filenames into qtext
- From
Junio C Hamano <junkio@cox.net>
- Date
- Oct 7, 2006, 09:46 UTC
- Message-ID
- <7vk63ctq47.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20061006193059.21334.qmail@web31807.mail.mud.yahoo.com>
Luben Tuikov <ltuikov@yahoo.com> writes:
Show 11 quoted lines
>> > +# Convert a string (e.g. a filename) into qtext as defined
>> > +# in RFC 822, from RFC 2183. To be used by Content-Disposition.
>> > +sub to_qtext {
>> > + my $str = shift;
>> > + $str =~ s/\\/\\\\/g;
>> > + $str =~ s/\"/\\\"/g;
>> > + $str =~ s/\r/\\r/g;
>>
>> \r? Not \n?
>
> Yes, \r, not \n.\r to \\r? Not to \\\r?