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

Summary: DIV in TH parsing issue; was:HTML formatter does not handle div within th
Product: web Reporter: adrianriley <adrianriley>
Component: HTML EditorAssignee: Marek Fukala <mfukala>
Status: RESOLVED FIXED    
Severity: normal CC: TheTechFan
Priority: P3    
Version: 7.3   
Hardware: Other   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Simple example

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