Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: mjd [...] plover.com
Cc:
AdminCc:

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



Subject: "entities" option to ->as_HTML not behaving as advertised
use HTML::TreeBuilder; my $TB = HTML::TreeBuilder->new(); my $html = $TB->parse("This &#x17f;oftware has &#383;ome bugs")->eof->element\ ify(); print $html->as_HTML(""); The documentation claims: The optional argument $entities specifies a string of the entities to encode. For compatibility with previous versions, specify '<>&' here. If omitted or undef, all unsafe characters are encoded as HTML entities. If behavior were as described, the argument of "" that I've supplied should be taken as "a string of the entitites to encode", since it is neither omitted nor undef. However, HTML::Element seems to be taking "" to be the same as an omitted or undefined argument here. An argument of "\0" does suppress the encoding feature.
POD has been updated to reflect this inaccuracy, and your workaround has been placed into the POD as well. Thank you for the suggestion. This fix is part of HTML-Tree 3.22, which will be released this weekend as part of the Chicago Hackathon.
Subject: Re: [rt.cpan.org #18569] "entities" option to ->as_HTML not behaving as advertised
Date: Sat, 11 Nov 2006 23:14:56 -0500
To: bug-HTML-Tree [...] rt.cpan.org
From: Mark Jason Dominus <mjd [...] plover.com>
Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=18569 > > > POD has been updated to reflect this inaccuracy, and your workaround has > been placed into the POD as well. Thank you for the suggestion.
That wasn't my suggestion, and using the documentation to codify the workaround for this dumbassed bug is exactly the wrong approach, in my opinion.
On Sat Nov 11 23:15:19 2006, mjd@plover.com wrote: Show quoted text
> That wasn't my suggestion, and using the documentation to codify the > workaround for this dumbassed bug is exactly the wrong approach, in my > opinion.
You are absolutely right, and I have been properly rebuked. 3.23 is on its way to CPAN.