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

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

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Jun 2, 2022, 07:26 UTC
Message-ID
<530f7bb4-9f12-f681-0188-878054c4efbf@gmail.com>
In-Reply-To
<20220601012647.1439480-1-jason@jasonyundt.email>
On 6/1/22 08:26, Jason Yundt wrote:
Show 39 quoted lines
> According to the HTML Standard FAQ:
> 
> 	“What is the DOCTYPE for modern HTML documents?
> 
> 	In text/html documents:
> 
> 		<!DOCTYPE html>
> 
> 	In documents delivered with an XML media type: no DOCTYPE is required
> 	and its use is generally unnecessary. However, you may use one if you
> 	want (see the following question). Note that the above is well-formed
> 	XML.”
> 
> 	Source: [1]
> 
> Gitweb uses an XHTML 1.0 DOCTYPE:
> 
> 	<!DOCTYPE html PUBLIC
> 	"-//W3C//DTD XHTML 1.0 Strict//EN"
> 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> 
> 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].
> 2. It’s obsolete. XHTML 1.0 was last revised in 2002 and was superseded in
>    2018 [3].
> 3. It’s unreliable. Gitweb uses &nbsp; and &sdot; but lets an external file
>    define them. “[…U]using entity references for characters in XML documents
>    is unsafe if they are defined in an external file (except for &lt;, &gt;,
>    &amp;, &quot;, and &apos;).” [4]
> 
> [1]: <https://github.com/whatwg/html/blob/main/FAQ.md#what-is-the-doctype-for-modern-html-documents>
> [2]: <https://html.spec.whatwg.org/multipage/xhtml.html#parsing-xhtml-documents>
> [3]: <https://www.w3.org/TR/xhtml1/#xhtml>
> [4]: <https://html.spec.whatwg.org/multipage/xhtml.html#writing-xhtml-documents>
> 
> Signed-off-by: Jason Yundt <jason@jasonyundt.email>

So basically what this patch does is switch to HTML5, right? That is because I can see DOCTYPE "upgrade" to use "<!DOCTYPE html>", which is the DOCTYPE for HTML5. If it does, then mention HTML5 in v2.

-- 
An old man doll... just what I always wanted! - Clara
Previous: Junio C HamanoNext: Jason Yundt
Message 4 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.