Skip to content

Invalid HTML produces duplicated elements #588

Description

@mohe2015

The following invalid HTML:

<html>
        <body>
        <div class="tb nb"><a href="https://www.humanw.tu-darmstadt.de/fachbereich/index.de.jspZur Homepage des Fachbereichs.</a><br></div>
	<div class="tb" >
    </div>
    </body>
    </html>

produces duplicate elements when parsing with rcdom:

     Running `/home/moritz/Documents/html5ever/target/debug/examples/print-rcdom`
#Document
    <html>
        <head>
        <body>
            #text: \n        
            <div class="tb nb">
                <a href="https://www.humanw.tu-darmstadt.de/fachbereich/index.de.jspZur Homepage des Fachbereichs.</a><br></div>
        <div class=" tb"="">
                    #text: \n    
            <a href="https://www.humanw.tu-darmstadt.de/fachbereich/index.de.jspZur Homepage des Fachbereichs.</a><br></div>
        <div class=" tb"="">
                #text: \n    \n    \n

Parse errors:
    Unexpected token
    Bad character
    Bad character
    Unexpected open element
    Unexpected open tag at end of body

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions