There is a bug in hparser.c [line 519] irt the handling of HTML comments.

518      if (s < end) {
519        s = token_pos.end + 2;
520        goto LOCATE_END;

On line 519, we are looking for the end of an html comment '-->' and
incrementing by 2, when it should be incrementing by 1.  This bug comes to
life when there is an odd number of '-' characters in an html comment.

line 519 should be:

s = token_pos.end + 1 ;

I patched it on my distribution and it is correct.

Gisle,
why did $p->decode_text_entities go away in release 2.99_15?
I don't agree that html entities should be autmatically decoded;  this
should be up to the programmer and application of HTML::TokeParser.  I
personally had to comment out the code for your HTML decoding for my
application :)  It would be great if you would put it back in; thoughts?

Frey Kuo

Reply via email to