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

Re: [PATCH] gitweb: parse_commit_text encoding fix

From
ZFZoltán Füzesi <zfuzesi@eaglet.hu>
Date
Aug 6, 2009, 08:15 UTC
Message-ID
<9ab80d150908060115q4b56b2e5xb327e09cda7e2b7a@mail.gmail.com>
In-Reply-To
<7viqh43vz3.fsf@alter.siamese.dyndns.org>
2009/8/4 Junio C Hamano <gitster@pobox.com>:
Show 14 quoted lines
>
> Thanks, Zoltán.
>
> We should be able to set up a script that scrapes the output to test this
> kind of thing.  We may not want to have a test pattern that matches too
> strictly for the current structure and appearance of the output
> (e.g. counting nested <div>s, presentation styles and such), but if we can
> robustly scrape off HTML tags (e.g. "elinks -dump") and check the
> remaining payload, it might be enough.
>
> Jakub what do you think?  I suspect that scraping approach may turn out to
> be too fragile for tests to be worth doing, but I am just throwing out a
> thought.
>

This issue comes out when chop_and_escape_str function is called with a non-ascii string (like my name :)) without before calling to_utf8 on it. "author_name" and "committer_name" are two examples, and "author_name" shows up with bad encoding in HTML.

Example from one of my repos (little piece from shortlog output): <td class="author"><span title="Füzesi Zoltán">Füzesi Zoltán</span></td> After applying the patch: <td class="author">Füzesi Zoltán</td>

This is an "old" (seen in 1.5.6 version too) and (I think) minor issue. I haven't spent time on thinking how a test script could show this yet. Waiting for Jakub's reaction.

Previous: Junio C HamanoNext: Jakub Narebski
Message 6 of 8 in “gitweb: parse_commit_text encoding fix”
  1. gitweb: parse_commit_text encoding fixZoltán Füzesi, Aug 1, 2009
  2. Jakub NarebskiAug 1, 2009
  3. Füzesi ZoltánAug 1, 2009
  4. gitweb: parse_commit_text encoding fixZoltán Füzesi, Aug 2, 2009
  5. Junio C HamanoAug 4, 2009
  6. Zoltán FüzesiAug 6, 2009
  7. Jakub NarebskiAug 7, 2009
  8. Jakub NarebskiAug 7, 2009

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.