in reply to A Perl/CGI alternative to PHP's htmlentities()?
use HTML::Entities; my $html = "bad stuff here"; $html = encode_entities($html, "\x80-\xff"); [download]