Reputation: 5993
In PHP it's as simple as htmlspecialchars
, how to do it in Perl?
Upvotes: 1
Views: 1642
Reputation: 33395
Use the HTML::Entities module.
use HTML::Entities;
my $input = "<em>TEST</em>";
print(encode_entities($input));
Upvotes: 7