This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222664 - DIV in TH parsing issue; was:HTML formatter does not handle div within th
Summary: DIV in TH parsing issue; was:HTML formatter does not handle div within th
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.3
Hardware: Other Linux
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 13:56 UTC by adrianriley
Modified: 2014-07-23 10:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Simple example (436 bytes, text/html)
2012-11-23 13:56 UTC, adrianriley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adrianriley 2012-11-23 13:56:57 UTC
Created attachment 128318 [details]
Simple example

If a <th> element contains a <div> element, an error is shown (Element "div" is not allowed as child element of "th" in this context). I'm not sure that's correct, the HTML DTD suggests that th should allow any flow element as child, as td does. In any case, the formatter fails to format the content correctly. See the attached example.
Comment 1 Marek Fukala 2012-11-26 15:42:02 UTC
<!DOCTYPE html>
<html>
    <head>
        <title></title>
    </head>
    <body>
        <table>
            <tr> 
                <th>
            <div>
            </div>
                </th>
                <td></td>
            </tr>
        </table> 
    </body>
</html>

seems to be valid html5 content, however the html.validator complains about the div tag in th as adrianriley reported.
Comment 2 Marek Fukala 2014-07-23 10:31:00 UTC
seems to be fixed