The second argument provides the "unsafe" characters that you want encoded. perldoc HTML::Entities.use HTML::Entities; my $encoded = encode_entities( $input, "&;" );
In reply to Re: Safer (and cleaner) way to print user-supplied text.
by btrott
in thread Safer (and cleaner) way to print user-supplied text.
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |