Skip Menu |

This queue is for tickets about the HTML-Parser CPAN distribution.

Report information
The Basics
Id: 12452
Status: resolved
Priority: 0/
Queue: HTML-Parser

People
Owner: Nobody in particular
Requestors: KAPPA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.45
Fixed in: (no value)



Subject: HTML::Parser fails HTML comments issue hilited in Acid2 test
In the code "<!-- -- --->ERROR<!- ------ >" text "ERROR" is in fact INSIDE a comment. HTML::Parser seems to fail here. This very issue in Safari is discussed thoroughly here: (text) http://weblogs.mozillazine.org/hyatt/archives/2005_04.html#007953 (comments) http://weblogs.mozillazine.org/mt/comment.cgi?entry_id=7953 Sorry, no patch :(
If you enable 'strict_comment' it will parse it that way: $ cat xxx.pl use HTML::Parser; use Data::Dump; $p = HTML::Parser->new( strict_comment => 1, default_h => [\&Data::Dump::dump, "event, tokens"], ); $p->parse("<!-- -- --->ERROR<!- ------ >"); $p->eof; __END__ $ perl xxx.pl ("start_document", undef) ("comment", [" ", "->ERROR<!- ", ""]) ("end_document", undef)
From: kappa [...] cpan.org
Oh, excuse my not checking the constructor options! I should have done that before going to RT. This bug may be closed then, I think.