Re: Tidy bug
Ger Hobbelt <[email protected]> Mon, 9 Nov 2009 15:58:49 +0100
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Nov 8, 2009 at 8:05 PM, Klaus Johannes Rusch <[email protected]> wrote: > For this specific example, moving the <tr> into the table (and the tbody) > would seem a better solution, not sure we can generalize this though.=A0 = The > dangling tr could be handled in four ways: > [...] > 2. Discard the tr element and keep the content (this is the behaviour of = IE7 > and Firefox 3, good for a browser, maybe good for tidy?) > 3. Surround the tr element with a new table (would address the issue below > but we may end up with lots of tablen when there is a missing table eleme= nt > and multiple trs) Preferably #2. Reason: when applying htmltidy to content which contains such markup errors, it will thus perform a cleanup which will change the 'look' of the output only negligibly (or not at all) when both versions are viewed in browsers - and that's where most of us eyeball HTML anyway. If not #2, then #3, so that is stays apart from the other chunks of content and is, as such, still somewhat identifiable as the part where the original input contained a markup error. For trailing <tr> sections, i.e. <tr>s immediately following a </table> I can see why one would want to merge it in with the table above (#4); here it about leading <tr> before a <table> and that is a markup error of same or higher severity IMHO and should be treated as such, so #4 is lowest on the list of 'good' choices. Discarding content (#1) should be prevented when possible, so please don't pick #1. (Putting at <table> around it is way more informative and educational to the one who screwed up the markup like that, either by hand or through generator code, than plonking content chunks to /dev/null ) -- = Met vriendelijke groeten / Best regards, Ger Hobbelt -------------------------------------------------- web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: [email protected] mobile: +31-6-11 120 978 -------------------------------------------------- ---------------------------------------------------------------------------= --- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day = trial. Simplify your report design, integration and deployment - and focus = on = what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july