Skip Menu |

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

Report information
The Basics
Id: 59980
Status: resolved
Priority: 0/
Queue: HTML-Tree

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

Bug Information
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.