Another possibility: HTML::FromText:
use strict; use warnings; use HTML::FromText; my $text = '< René & François >'; my $t2h = HTML::FromText->new( ); my $html = $t2h->parse( $text ); print $html;
Output
< René & François >In reply to Re: A Perl/CGI alternative to PHP's htmlentities()?
by Not_a_Number
in thread A Perl/CGI alternative to PHP's htmlentities()?
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |