forward port of newline/cr bug fix

This commit is contained in:
Colin Kuskie 2006-02-10 21:18:13 +00:00
parent b13ba6a2c2
commit c68c65a504
5 changed files with 25 additions and 1 deletions

View file

@ -86,6 +86,7 @@ Parses the posted value and tries to make corrections if necessary.
sub getValueFromPost {
my $self = shift;
my $value = $self->session->form->param($self->get("name"));
$value =~ tr/\r\n//d;
if ($value =~ /mailto:/) {
return $value;
} elsif ($value =~ /^([A-Z0-9]+[._+-]?){1,}([A-Z0-9]+[_+-]?)+\@(([A-Z0-9]+[._-]?){1,}[A-Z0-9]+\.){1,}[A-Z]{2,4}$/i) {