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

Re: [PATCH] gitweb: Strip non-printable characters from syntax highlighter output

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 16, 2011, 20:24 UTC
Message-ID
<7v62ksfd78.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201109162058.51132.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> So actually now I see that while this line is good to have in esc_html(),
> it is not really necessary in sanitize().
>
> But anyway we don't want to replace undef with an empty string; undef is
> (usually) an error, and we want to catch it, not to hide it.

Heh, get off your high horse---whoever wrote such a caller that calls the subroutine and uses its result without checking it against undef is not qualified to make such a statement. I do not think letting "perl -w" notice and complain about an attempt to concatenate undef with string counts as "catching" it.

Previous: Jakub NarebskiNext: Christopher M. Fuhrman
Message 9 of 10 in “gitweb: highlight: strip non-printable characters via col(1)”
  1. gitweb: highlight: strip non-printable characters via col(1)Christopher M. Fuhrman, Aug 22, 2011
  2. Junio C HamanoAug 22, 2011
  3. Jakub NarebskiAug 26, 2011
  4. Junio C HamanoAug 26, 2011
  5. Jakub NarebskiAug 26, 2011
  6. gitweb: Strip non-printable characters from syntax highlighter outputJakub Narebski, Sep 16, 2011
  7. Junio C HamanoSep 16, 2011
  8. Jakub NarebskiSep 16, 2011
  9. Junio C HamanoSep 16, 2011
  10. Christopher M. FuhrmanSep 16, 2011

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.