I have a web form with a text area that I feed back through a cgi
script and "filter" the text with;

$q1_elaborate =~ s/[^[:alpha:]' .-]//g;
    quotemeta($q1_elaborate);

I admit to doing a google search on "perl remove malicious code" and
took that code from one of the results.(and not quite understanding
what it does)

However, it removes line feeds as well, so maybe that code is not all
that good.

Just wondering if this would be just as adequate in filtering
"malicious code" 

$q1_elaborate =~ s/[`\\"|!\.\^]//g

TIA

-- 
Owen

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to