"Robert Bergs" <[EMAIL PROTECTED]> writes:
> Given a file containing something like this :-
>
> <style>
> <!--
> ...details of style
> -->
> </style>
>
> The HTML::TreeBuilder / HTML::Entities modules have a problem when
> re-outputting the HTML. The < and > in the comments get incorrectly replaced
> for < and &rt; which 'breaks' the HTML. The same happens for commented
> Javascript as well. I don't know if the problem is with as_HTML or
> elsewhere. Anyone got any advice / workarounds / more info?
The problem is that HTML::Element's as_HTML() need to taught that it
should not endode_entities() for elements with CDATA content. This
include <script>, <style>, <xmp> and <plaintext>.
Regards,
Gisle