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

Report information
The Basics
Id:
59980
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Jeff.Fearn [...] gmail.com
Requestors:
sprout [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Problem with </td> and </th>
Date: Sun, 1 Aug 2010 12:37:45 -0700
To: bug-HTML-Tree@rt.cpan.org
From: Father Chrysostomos <sprout@cpan.org>
All web browser I’ve tried this with ignore invalid </td> and </th> tags inside a table. HTML::TreeBuilder searches all the way up the hierarchy till it finds an element to close, even if it means that </td> will close a table. This affects code like this (albeit invalid): <table><tr><td> <table><tr><td></th></tr></table> </table> Changing this part of sub end } else { # the call came from Parser -- just ignore origtext @stop = (); } to } else { # the call came from Parser -- just ignore origtext @stop = $tag =~ /^t[hd]\z/ ? 'table' : (); } fixes the problem.
Added this patch to git repo, it will be in next dev release. Also made regex /^t[hdr]\z/ as I just know someone is going to ask for the r :)
Subject: 4.0 released
Hi HTML::Tree ve4rsion 4.0 has been released which includes a fix for this issue. Cheers, Jeff.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.