From: "J.H." <warthog9@eaglescrag.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] gitweb: Fix chop_str to allow for & characters in strings
Date: Tue, 02 Feb 2010 15:54:53 -0800 [thread overview]
Message-ID: <4B68BB4D.20105@eaglescrag.net> (raw)
In-Reply-To: <m3mxzr9pcz.fsf@localhost.localdomain>
On 02/02/2010 03:43 PM, Jakub Narebski wrote:
> "John 'Warthog9' Hawley" <warthog9@eaglescrag.net> writes:
>
>> I'm unsure why this was placed in their originally, and it seems to
>> ultimately stem from code from before gitweb was merged into git core,
>> but there's an instance where git chops a string incorrectly based on
>> this.
>>
>> Specifically:
>>
>> API & protocol: support option to force written data immediately to disk
>>
>> from http://git.kernel.org/?p=daemon/distsrv/chunkd.git;a=commit;h=3b02f749df2cb1288f345a689d85e7061f507e54
>>
>> The short version of the title gets chopped to
>>
>> API ...
>>
>> where it should be
>>
>> API & protocol: support option to force written data...
>>
>> This reverts that specific problem.
>> ---
>> gitweb/gitweb.perl | 1 -
>> 1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
>> index 57771a0..4cc6d19 100755
>> --- a/gitweb/gitweb.perl
>> +++ b/gitweb/gitweb.perl
>> @@ -1382,7 +1382,6 @@ sub chop_str {
>> my $body = $1;
>> my $tail = $2;
>> if (length($tail) > 4) {
>> - $body =~ s/&[^;]*$//;
>> $tail = "... ";
>> }
>> return "$body$tail";
>
> I think it is a good change. chop_str is meant to be used _before_
> HTML escaping (esc_html or equivalent) is to be applied; removed line
> looks like it was meant (badly) to always remove HTML entities
> fully... but those entities are only added later.
>
> So now what is left is to come up with proper commit message, and add
>
> Signed-off-by: John 'Warthog9' Hawley" <warthog9@kernel.org>
> Acked-by: Jakub Narebski <jnareb@gmail.com>
>
There's a couple more lines, similar to that, ins chop_str. The bug I
needed to fix didn't tickle those, so I made the smallest change
possible. But those should probably be looked at as well.
- John 'Warthog9' Hawley
next prev parent reply other threads:[~2010-02-02 23:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 21:56 [PATCH 0/2] gitweb misc fixes mkII John 'Warthog9' Hawley
2010-02-02 21:56 ` [PATCH 1/2] gitweb: Add an option to force version match John 'Warthog9' Hawley
2010-02-02 21:56 ` [PATCH 2/2] gitweb: Fix chop_str to allow for & characters in strings John 'Warthog9' Hawley
2010-02-02 23:43 ` Jakub Narebski
2010-02-02 23:54 ` J.H. [this message]
2010-02-03 11:28 ` [PATCH] gitweb: Simplify (and fix) chop_str Jakub Narebski
2010-02-03 18:25 ` J.H.
2010-02-02 22:59 ` [PATCH 1/2] gitweb: Add an option to force version match Junio C Hamano
2010-02-02 23:56 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B68BB4D.20105@eaglescrag.net \
--to=warthog9@eaglescrag.net \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.