Re: gitweb not friendly to firefox?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Li Yang-r58472" <LeoLi@xxxxxxxxxxxxx> writes:

> Hi Jakub,
>
> Problem sovled, using the following patch.  I'm not an expert of perl,
> so I don't know if it is problem of the gitweb or problem with my perl
> environment.  My environment is perl-5.8.0 and perl-CGI-2.81.
>
> Signed-off-by: Li Yang<leoli@xxxxxxxxxxxx>
> ---
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 653ca3c..8c9a291 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -591,7 +591,7 @@ sub esc_html ($;%) {
>         my %opts = @_;
>
>         $str = to_utf8($str);
> -       $str = escapeHTML($str);
> +       $str = $cgi->escapeHTML($str);
>         if ($opts{'-nbsp'}) {
>                 $str =~ s/ /&nbsp;/g;
>         }
>

This is puzzling....

 (1) we have two call sites of escapeHTML(), but your patch
     touches only one.

 (2) we do "use CGI qw(:standard :escapeHTML -nosticky);"
     upfront, presumably after doing this when we say
     escapeHTML() it means the same as CGI::escapeHTML().

 (3) we do "$cgi = new CGI" upfront.

So I am wondering how the patch can have any effect...

I am not saying that I do not believe you when you say the patch
fixes the problem for you.  I just do not understand why and I
hate not knowing why something works.



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]