- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 7 May 2013 09:53:34 -0700
- To: Henrik Andersson <henke@henke37.cjb.net>
- Cc: Šime Vidas <sime.vidas@gmail.com>, www-style list <www-style@w3.org>
On Tue, May 7, 2013 at 9:27 AM, Henrik Andersson <henke@henke37.cjb.net> wrote: > Tab Atkins Jr. skriver: >> This is perfectly valid HTML. If htmldiff is breaking when its >> omitted, then it's a broken tool. It should get a better HTML parser. > > Valid? Yes. Good practice? No. Chance of the omission being a mistake? High. Perfectly fine practice - we only add a <head> start tag to host some attributes. The </head> close tag adds literally nothing to the document - the <body> starts as soon as you see an element that can't belong in the head. There's virtually no chance of a mistake. HTML parsing is a solved problem - we have a spec that all browsers follow, which specifies this down to the last detail. htmldiff should use this - there is a Python implementation in html5lib, but the spec itself isn't hard to implement, just tedious. ~TJ
Received on Tuesday, 7 May 2013 16:54:21 UTC