diff options
author | dave%intrec.com <> | 2000-09-29 12:29:09 +0000 |
---|---|---|
committer | dave%intrec.com <> | 2000-09-29 12:29:09 +0000 |
commit | 4c3068ee06914665fc630d2fa7a8215e6bc60eaf (patch) | |
tree | c4a61477a639c948bb54317f8cf53d19741b0390 /doeditparams.cgi | |
parent | 568b941f795464c614cbeffc0685ae2cb8592147 (diff) | |
download | bugs-4c3068ee06914665fc630d2fa7a8215e6bc60eaf.tar bugs-4c3068ee06914665fc630d2fa7a8215e6bc60eaf.tar.gz bugs-4c3068ee06914665fc630d2fa7a8215e6bc60eaf.tar.bz2 bugs-4c3068ee06914665fc630d2fa7a8215e6bc60eaf.tar.xz bugs-4c3068ee06914665fc630d2fa7a8215e6bc60eaf.zip |
Fix for bug 44076: Editparams falsely detecting text field changes and
NS4Mac putting a single linefeed in empty fields.
Diffstat (limited to 'doeditparams.cgi')
-rwxr-xr-x | doeditparams.cgi | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doeditparams.cgi b/doeditparams.cgi index cc7b66107..148946fef 100755 --- a/doeditparams.cgi +++ b/doeditparams.cgi @@ -51,7 +51,8 @@ foreach my $i (@::param_list) { if (exists $::FORM{"reset-$i"}) { $::FORM{$i} = $::param_default{$i}; } - $::FORM{$i} =~ s/\r\n/\n/; # Get rid of windows-style line endings. + $::FORM{$i} =~ s/\r\n/\n/g; # Get rid of windows-style line endings. + $::FORM{$i} =~ s/^\n$//; # assume single linefeed is an empty string if ($::FORM{$i} ne Param($i)) { if (defined $::param_checker{$i}) { my $ref = $::param_checker{$i}; @@ -64,6 +65,8 @@ foreach my $i (@::param_list) { } } print "Changed $i.<br>\n"; +# print "Old: '" . url_quote(Param($i)) . "'<BR>\n"; +# print "New: '" . url_quote($::FORM{$i}) . "'<BR>\n"; $::param{$i} = $::FORM{$i} } } |