fb55/node-htmlparser — pull request #38 by burl (2013-04-03 18:22:16+00:00)
Title: fix for script tags

I found some unexpected behavior:

Foo

will cause the tokenizer to properly emit a "closetag" event for but, all that follows will only emit "ontext" events.

I assume this behavior exists for style elements as well, but did not check for it.

My fix is to force this._special back to 0 after emitting a closetag event.

I updated the Event/02-template.json test by wrapping the html in a

...

element to test for this. Prior to my fix, the

would have emitted an 'ontext' event and now it properly emits an 'onclosetag' event.