git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitweb not friendly to firefox?

From
Junio C Hamano <junkio@cox.net>
Date
Mar 2, 2007, 10:17 UTC
Message-ID
<7vabyweypw.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<989B956029373F45A0B8AF02970818902DA81B@zch01exm26.fsl.freescale.net>
"Li Yang-r58472" <LeoLi@freescale.com> writes:
Show 22 quoted lines
> 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@freecale.com>
> ---
> 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.

Previous: Li Yang-r58472Next: Li Yang-r58472
Message 8 of 24 in “Re: gitweb not friendly to firefox?”
  1. Eygene RyabinkinMar 1, 2007
  2. Raimund BauerMar 1, 2007
  3. Li Yang-r58472Mar 2, 2007
  4. Junio C HamanoMar 2, 2007
  5. Li Yang-r58472Mar 2, 2007
  6. Junio C HamanoMar 2, 2007
  7. Li Yang-r58472Mar 2, 2007
  8. Junio C HamanoMar 2, 2007
  9. Li Yang-r58472Mar 2, 2007
  10. (Re: gitweb not friendly to firefox?) and unusable in the lynxOleg Verych, Mar 2, 2007
  11. Jakub NarebskiMar 3, 2007
  12. Nicolas PitreMar 3, 2007
  13. Jakub NarebskiMar 3, 2007
  14. Nicolas PitreMar 3, 2007
  15. Jakub NarebskiMar 3, 2007
  16. Nicolas PitreMar 3, 2007
  17. Jakub NarebskiMar 4, 2007
  18. Uwe Kleine-KönigMar 4, 2007
  19. Nicolas PitreMar 3, 2007
  20. Oleg VerychMar 3, 2007
  21. Johannes SchindelinMar 3, 2007
  22. Junio C HamanoMar 3, 2007
  23. Oleg VerychMar 3, 2007
  24. sfMar 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.