Skip Menu |
 

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

Report information
The Basics
Id: 20331
Status: rejected
Priority: 0/
Queue: HTML-Tree

People
Owner: Nobody in particular
Requestors: gstewar8 [...] une.edu.au
Cc:
AdminCc:

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



Subject: When I use replace_with_content the structure of the html seems to be destroyed
Date: Fri, 7 Jul 2006 11:18:55 +1000
To: andy [...] petdance.com
From: Gerwood Stewart <gstewar8 [...] une.edu.au>
Andy I have been playing with HTML::Tree or more specifically HTML::Element. I have found that when I use replace_with_content the structure of the html seems to be destroy. Below is an example of the resulting code. I have several questions. Did you know about this? If so is there a way around it or should I be using something other that replace_with_content()? I am happy to look through the code as see if I can find the reason myself, but I thought you may already know about this. (It's a very useful module by the way) Thanks Gerwood Stewart <div class="Section1"> </div> <table border="1" cellpadding="0" cellspacing="0" style="border- collapse:collapse; border:none"> </table> <tr> </tr> <td style="width:130.0pt;border-top:solid teal 2.25pt; border-left:solid teal 2.25pt;border-bottom:none;border-right:none; background:#E5E5E5;padding:0cm 5.4pt 0cm 5.4pt" valign="top" width="130"> </td> <p class="cgBodyText"><img alt="CGTable.Metadata" height="30" id="_x0000_i1025" src="topicnotesguygenielinksremoved1_files/ image001.jpg" width="103" /><td style="width:294.0pt;border-top:solid teal 2.25pt; border-left:none;border-bottom:none;border-right:solid teal 2.25pt; background:#E5E5E5;padding:0cm 5.4pt 0cm 5.4pt" valign="top" width="294"> </td> <p class="cgBodyText">&nbsp;<tr> </tr> <td style="width:130.0pt;border:none;border-left:solid teal 2.25pt; background:#E5E5E5;padding:0cm 5.4pt 0cm 5.4pt" valign="top" width="130"> </td> <p class="cgBodyText">Title<td style="width: 294.0pt;border:none;border-right:solid teal 2.25pt; padding:0cm 5.4pt 0cm 5.4pt" valign="top" width="294"> </td> <p class="cgBodyText">GEPL 316 - Topic Notes<tr> </tr> <td style="width:130.0pt;border:none;border-left:solid teal 2.25pt; background:#E5E5E5;padding:0cm 5.4pt 0cm 5.4pt" valign="top" width="130"> </td> <p class="cgBodyText">Description<td style="width: 294.0pt;border:none;border-right:solid teal 2.25pt; padding:0cm 5.4pt 0cm 5.4pt" valign="top" width="294"> </td> <p class="cgBodyText">&nbsp;<tr> </tr>
Download (untitled) / with headers
text/plain 379b
HTML::Tree and friends is not guaranteed to produce the same HTML output for a given input. As part of the replace_with_content operation, the HTML::Parser's interpretation of the HTML is used to produce the output. This isn't a "bug" in the sense that it's not incorrect behavior, and HTML::Tree will probably never guarantee to duplicate the exact same HTML out that came in.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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