hello evryone,

my script uses:
sub cleanup {
  my $str = $_[0];
  $str =~ s/[<>"'&]//igs;
  return $str;
}

at cgi.pm from l. stein I found:
sub clean_name {
   local($name) = @_;
   unless ($name=~/^[\w\._-]+$/) {
    die "Attempt to use naughty characters";
   }
   return $name;
}

which regex is better for checking the output of a html formular.

thanks for your advices!
regards
max attems

Reply via email to