Menu

#128 wrong nesting elements

open-accepted
scanner (58)
5
2011-04-04
2011-03-31
Anonymous
No

input:
<object data="734578" />
<embed src="fsdfsd" />

output:
<?xml version="1.0"?>
<HTML>
<HEAD/>
<BODY>
<OBJECT data="734578">
<EMBED src="fsdfsd"/>
</OBJECT>
</BODY>
</HTML>

If you try "<a ... /><a ... />" it works. If you try "<object .../><embed .../>" it will not work.

Discussion

  • Marc Guillemot

    Marc Guillemot - 2011-03-31
    • assigned_to: nobody --> mguillem
    • status: open --> closed-invalid
     
  • Marc Guillemot

    Marc Guillemot - 2011-03-31

    Look at what your browser does: you will get exactly the same DOM.

     
  • Anonymous

    Anonymous - 2011-03-31

    Hmm, really interesting! I didn't know that. However I did some other tests and your parser behaves different, for example for this:

    <a href="ahoj" />
    <a href="nazdar" />
    <object data="cau.swf" />
    <embed src="src" />

    your parser produces:

    <a href="ahoj">
    </a>
    <a href="nazdar">
    </a>
    <object data="cau.swf"><a href="nazdar">
    </a><embed src="src"><a href="nazdar">
    </a></embed></object>

    which is way different from FF:

    <a href="ahoj">
    </a><a href="nazdar">
    <object data="cau.swf">
    <embed src="src">
    </object></a>

    What do you think?

     
  • Anonymous

    Anonymous - 2011-03-31
    • status: closed-invalid --> open-invalid
     
  • Anonymous

    Anonymous - 2011-04-04

    Please, can you have a look at this bug? I think it's realy not invalid bug, since it behaves differently than my browser

     
  • Marc Guillemot

    Marc Guillemot - 2011-04-04
    • status: open --> open-accepted
     
  • Marc Guillemot

    Marc Guillemot - 2011-04-04

    You're right, parsing is incorrect here.

     

Log in to post a comment.