Skip to content

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

@davidfoliveira

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: []

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