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

Re: [PATCH] gitweb: switch to a modern DOCTYPE

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 2, 2022, 06:10 UTC
Message-ID
<xmqqa6avppci.fsf@gitster.g>
In-Reply-To
<YpgHUm93840oBtib@camp.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 28 quoted lines
>> While that DOCTYPE is still valid [2], it has several disadvantages:
>> 
>> 1. It’s misleading. The DTD that browsers are supposed to use with that
>>    DOCTYPE has nothing to do with XHTML 1.0 and isn’t available at the URL
>>    that is given [2].
>
> While the WHATWG may claim that, an XML parser is absolutely within its
> rights to refer to and use that DTD, and in fact should do so unless its
> catalog directs it elsewhere.  It may be that some browsers use an
> internal catalog that refers to a different DTD, however.
>
>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
>> index 606b50104c..1835487ab2 100755
>> --- a/gitweb/gitweb.perl
>> +++ b/gitweb/gitweb.perl
>> @@ -4219,7 +4219,10 @@ sub git_header_html {
>>  	my $mod_perl_version = $ENV{'MOD_PERL'} ? " $ENV{'MOD_PERL'}" : '';
>>  	print <<EOF;
>>  <?xml version="1.0" encoding="utf-8"?>
>> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>> +<!DOCTYPE html [
>> +	<!ENTITY nbsp "&#xA0;">
>> +	<!ENTITY sdot "&#x22C5;">
>> +]>
>
> I think this should be fine.  It defines the entities we need and
> appears to be valid XML.  I don't think there should be any problem
> upgrading to XHTML 5 here.

OK, so in short, the patch text looks OK and the proposed log message needs a bit more work?

Thanks.
Previous: brian m. carlsonNext: Bagas Sanjaya
Message 3 of 9 in “gitweb: switch to a modern DOCTYPE”
  1. gitweb: switch to a modern DOCTYPEJason Yundt, Jun 1, 2022
  2. brian m. carlsonJun 2, 2022
  3. Junio C HamanoJun 2, 2022
  4. Bagas SanjayaJun 2, 2022
  5. gitweb: switch to an XHTML5 DOCTYPEJason Yundt, Jun 2, 2022
  6. Junio C HamanoJun 2, 2022
  7. Jason YundtJun 2, 2022
  8. brian m. carlsonJun 2, 2022
  9. Junio C HamanoJun 2, 2022

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.