Menu

#209 Unclosed HTML comment consume all body

v2.30
open
nobody
None
5
2023-06-19
2018-07-24
No

The following HTML:

<html>
    <body>
        <script type="text/javascript">
           <!--
               Comment
        </script>
        <h1>title</h1>
    </body>
</html>

Will produce an HTML with an empty body as everything will be as a comment of the script tag.

I believe the comment should be automatically closed when a matching closing tag is found, or is there another rule about this case?

Discussion

  • Scott Wilson

    Scott Wilson - 2018-07-24

    Thanks Anthony, I'll look into it and see if we can handle this case.

     
  • Scott Wilson

    Scott Wilson - 2019-09-04
    • Group: v 2.7 --> v2.24
     
  • Scott Wilson

    Scott Wilson - 2020-04-29
    • Group: v2.24 --> v2.25
     
  • Scott Wilson

    Scott Wilson - 2021-09-24
    • Group: v2.25 --> v2.26
     
  • Scott Wilson

    Scott Wilson - 2023-04-29
    • Group: v2.26 --> v2.29
     
  • Scott Wilson

    Scott Wilson - 2023-06-19
    • Group: v2.29 --> v2.30
     

Log in to post a comment.

Auth0 Logo