Input:
won't escape properly - uggh!
Desired Output: <pre>won't escape properly - uggh!</pre> Actual Output: <pre>won't escape properly - uggh!</pre>; or &lt;pre>won't escape properly - uggh!&lt;/pre> #### use XML::Twig; my $tTwig = XML::Twig->new( pretty_print => 'indented', output_text_filter => 'html', ); $tTwig->set_xml_version( '1.0' ); $tTwig->set_output_encoding( 'utf-8' ); my $tLog = XML::Twig::Elt->new( 'log', q(
won't escape properly - uggh!
) ); $tTwig->set_root( $tLog ); $tTwig->print;