Skip to content

Problem when a <script> tag is not closed. #71

Description

@davidfoliveira

If the parsed document has a <script> tag which is not closed, the parser acts like the document had nothing.
Example:

var
    htmlparser = require('htmlparser'),
    parser,
    pHandler,
    data = '<html><body><h1>Bla</h1><script src="somewhere"></body></html>';

pHandler = new htmlparser.DefaultHandler(function(err,doc){
    if ( err )
        throw err;
    console.log("doc: ",doc);
});

The result is:
doc: []

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions