Skip to content

need to handle corner-cases in parsing the script tag #169

@hrj

Description

@hrj

I encountered JS parse errors while looking at javadocs. Turns out they use XML comments inside script tags something like this:

<script type="text/javascript"><!--
 console.log("Test");
 //-->
 var activeTableTab = "activeTableTab";
 </script>

gngr parses this correctly as per XHTML and HTML4. But other browsers are lenient in handling the comment, and the lenient behaviour seems to be codified now in HTML5.

Good discussion on this SO thread

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions