Re: Tidy bug
Klaus Johannes Rusch <[email protected]> Sun, 08 Nov 2009 20:05:18 +0100
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Organization | atmedia.net |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============5645456816102952147== Content-Type: multipart/alternative; boundary="------------090804020509060003090004" This is a multi-part message in MIME format. --------------090804020509060003090004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Ben McCann wrote: > Unfortunately the bug fix for the earlier issue hasn't totally solved > my problem. Here's a new bug report I filed with jtidy > <https://sourceforge.net/tracker/?func=detail&atid=113153&aid=2892958&group_id=13153>. > Consider the page below. Tidy inserts a <table> tag when it reaches > the unexpected <tr>. This causes it to discard the existing <table> > and the resulting page has lost the id attribute. A better behavior > would be to insert a new end tag instead of discarding the existing > start tag. 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. The dangling tr could be handled in four ways: 1. Discard the tr element and its content since it cannot appear in this position (probably not a good idea if it's just a matter of a missing table element) 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 element and multiple trs) 4. Move the tr into the existing table/tbody (may merge what should have been two tables) Thoughts? -- Klaus Johannes Rusch [email protected] http://www.atmedia.net/KlausRusch/ --------------090804020509060003090004 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Ben McCann wrote: <blockquote cite="mid:[email protected]" type="cite"> <div>Unfortunately the bug fix for the earlier issue hasn't totally solved my problem. Here's a <a moz-do-not-send="true" href="https://sourceforge.net/tracker/?func=detail&atid=113153&aid=2892958&group_id=13153">new bug report I filed with jtidy</a>. Consider the page below. Tidy inserts a <table> tag when it reaches the unexpected <tr>. This causes it to discard the existing <table> and the resulting page has lost the id attribute. A better behavior would be to insert a new end tag instead of discarding the existing start tag.</div> </blockquote> 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. The dangling tr could be handled in four ways:<br> <br> 1. Discard the tr element and its content since it cannot appear in this position (probably not a good idea if it's just a matter of a missing table element)<br> 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?)<br> 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 element and multiple trs)<br> 4. Move the tr into the existing table/tbody (may merge what should have been two tables)<br> <br> Thoughts?<br> <pre class="moz-signature" cols="72">-- Klaus Johannes Rusch <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> <a class="moz-txt-link-freetext" href="http://www.atmedia.net/KlausRusch/">http://www.atmedia.net/KlausRusch/</a></pre> </body> </html> --------------090804020509060003090004-- --===============5645456816102952147== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ 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 --===============5645456816102952147== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Tidy-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tidy-develop --===============5645456816102952147==--