- From: Richard A. O'Keefe <ok@atlas.otago.ac.nz>
- Date: Thu, 24 Jan 2002 12:58:19 +1300 (NZDT)
- To: html-tidy@w3.org
I asked that <HR> be turned into </PRE><HR><PRE> when it occurs inside <PRE>. Klaus Johannes Rusch <KlausRusch@atmedia.net> replied: There is a problem with this approach: [illegal version] and [legal version] are generally rendered quite differently -- pre is a block level element, and browsers add whitespace before/after block level elements. The point is that <HR> is NOT ALLOWED inside <PRE> by any current HTML specification. It isn't legal. Stuff like <pre>foo<hr>bar ugh<hr>zoo</pre> may (in fact, DOES) render as foo ---------------------------------------------------------------- ugh ---------------------------------------------------------------- in some browsers, with the "bar" and "zoo" text in effect not rendered at all. Oh, _some_ browsers treat <hr> inside <pre> as if it were <br>"rule"<br>, but some do NOT, and I have no reason to believe that the browsers that just do one break do the same one, or even that all browsers do even one break. I am requesting a change that turns *illegal* HTML into legal HTML, doing as little violence to the rendering as possible. By careful use of CSS, which I do not yet understand (even the book by the inventors is terribly vague about models and details), it should be possible to adjust the vertical spacing. Note also that a browser would be quite within its rights to treat <pre>foo<hr>bar ugh<hr>zoo</pre> as <pre>foo<!--ooh, here's a block level element, not allowed in a pre, I guess there's a missing /pre--></pre><hr>bar ugh<hr>zoo<!--heck, what's /pre doing here? I'll ignore it--> and I know of at least one HTML parser that will in fact do this. In short, illegal HTML can go more horribly wrong than people who want to preserve the exact look of it can imagine.
Received on Wednesday, 23 January 2002 18:58:23 UTC