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

Re: [PATCH] gitweb: parse_commit_text encoding fix

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 7, 2009, 00:41 UTC
Message-ID
<200908070241.07372.jnareb@gmail.com>
In-Reply-To
<7viqh43vz3.fsf@alter.siamese.dyndns.org>
On Tue, 4 Aug 2009, Junio C Hamano wrote:
Show 20 quoted lines
> Zoltán Füzesi <zfuzesi@eaglet.hu> writes:
> 
> > Call to_utf8 when parsing author and committer names, otherwise they will appear
> > with bad encoding if they written by using chop_and_escape_str.
> >
> > Signed-off-by: Zoltán Füzesi <zfuzesi@eaglet.hu>
> > ---
> 
> 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.

First, I'd like to have existing t9500-gitweb-standalone-no-errors.sh be about Perl errors and warning only, as it is now. Anything outside this should IMVHO be put in separate test.

Second, for checking whether gitweb handles non US-ASCII input correctly we don't need HTML scrapping or parsing. We can simply check if we have correct string in output... and (after Zoltán Füzesi example) that we don't have incorrect one. For example if we have 'xxxóxxx' in input, then there is 'xxxóxxx' in output, and that all match againts 'xxx.xxx' matches 'xxxóxxx'.

-- 
Jakub Narebski
Poland
Previous: Jakub Narebski
Message 8 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.