1 |
--- perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator.pm.nodata 2007-06-12 12:05:18.000000000 -0600 |
2 |
+++ perl-CGI-FormMagick-0.92/lib/CGI/FormMagick/Validator.pm 2007-06-12 12:06:05.000000000 -0600 |
3 |
@@ -460,11 +460,11 @@ |
4 |
|
5 |
# Trim leading and trailing whitespace from the field data, unless |
6 |
# there is a notrim attr set to true. |
7 |
- if ($field->{id} and $info->{type} ne 'literal' and not $info->{notrim}) |
8 |
+ if ($field->{id} and not $info->{notrim}) |
9 |
{ |
10 |
$self->debug_msg("Trimming whitespace around field $field->{id}"); |
11 |
my $data = $self->{cgi}->param($field->{id}); |
12 |
- if ($data =~ s/^\s+|\s+$//g) |
13 |
+ if (defined $data && $data =~ s/^\s+|\s+$//g) |
14 |
{ |
15 |
$self->debug_msg("Found whitespace to trim, resaving param"); |
16 |
$self->{cgi}->param(-name => $field->{id}, |