CGI documentation is large, and the distribution comes with lots of examples ,there is even a book on the module.#!/usr/bin/perl -- use strict; use warnings; use CGI(); my $q = CGI->new; print $q->header, $q->start_html, $q->escapeHTML('<><><><><><>'), $q->escapeHTML( $q->param('comments'), ''), $q->end_html; __END__ Content-Type: text/html; charset=ISO-8859-1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-U +S"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +" /> </head> <body> <><><><><><> </body> </html>
In reply to Re: Best way to use escapeHTML
by Anonymous Monk
in thread Best way to use escapeHTML
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |