Skip to content

Should parse in Quirks Mode if doctype not set #2197

@Muthukirthan

Description

@Muthukirthan

Input:

<html>
    <head></head>
    <body>
        <p>
            <span>
                <table>
                    <tbody>
                        <tr>
                            <td><span>Hello table data</span></td>
                        </tr>
                    </tbody>
                </table>
            </span>
        </p>
    </body>
</html>

Jsoup output:

<html>
    <head></head>
    <body>
        <p>
            <span>
                </span></p><table>
                    <tbody>
                        <tr>
                            <td><span>Hello table data</span></td>
                        </tr>
                    </tbody>
                </table>
            
        <p></p>
    </body>
</html>

Ref link: https://try.jsoup.org/~PNrKdofSo_QE8KX2IbZKZ-xxyq0

The table tag inside span of p tag is unwrapped as next sibling of p tag. Additionally an empty p tag is created as the next sibling of the unwrapped table tag. This output is not seen in Chrome and Firefox browsers

Metadata

Metadata

Assignees

Labels

fixedAn {bug|improvement} that has been {fixed|implemented}

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions