in reply to Re^2: Best way to use escapeHTML
in thread Best way to use escapeHTML

Yes, that's what it's for, although your naming really sucks, and you're using || '' against the wrong thing.

my $comment = $cgi->param('comment') || ''; # or whatever ... my $comment_html = $cgi->escapeHTML($comment); print header(); print "<p>Comments: $comment_html\n";