From: Tony Yat-T. C. <ton...@as...> - 2010-07-22 15:31:26
|
Hi, I found that jtidy has some unexpected handling of <pre> within <table>. For example, the following table codes are rendered properly in both IE and firefox, although it is probably not right to use <pre> this way. <table> <tr> <pre> <td>Hello</td> </pre> </tr> <tr> <pre> <td>1</td> </pre> </tr> </table> However, I would not expect jtidy would actually extract <pre> and its contents outside the <table>! The following is jtidy's output and its warnings. Is this a known issue? Is there any option in jtidy or workaround that handles this HTML table properly? Thank you. <html> <head> <title></title> </head> <body> <pre> <td>Hello</td> </pre> <pre> <td>1</td> </pre> <table> <tr> <td></td> </tr> <tr> <td></td> </tr> </table> </body> </html> line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 3 column 5 - Warning: <pre> isn't allowed in <tr> elements line 4 column 8 - Warning: unescaped <pre> in pre content line 4 column 16 - Warning: unescaped <pre> in pre content line 6 column -1 - Warning: missing <td> line 8 column 5 - Warning: <pre> isn't allowed in <tr> elements line 9 column 8 - Warning: unescaped <pre> in pre content line 9 column 12 - Warning: unescaped <pre> in pre content line 11 column -1 - Warning: missing <td> line 13 column 1 - Warning: inserting missing 'title' element InputStream: Document content looks like HTML 3.2 10 warnings, no errors were found! |