Commit 4c3068ee authored by dave%intrec.com's avatar dave%intrec.com

Fix for bug 44076: Editparams falsely detecting text field changes and

NS4Mac putting a single linefeed in empty fields.
parent 568b941f
...@@ -51,7 +51,8 @@ foreach my $i (@::param_list) { ...@@ -51,7 +51,8 @@ foreach my $i (@::param_list) {
if (exists $::FORM{"reset-$i"}) { if (exists $::FORM{"reset-$i"}) {
$::FORM{$i} = $::param_default{$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 ($::FORM{$i} ne Param($i)) {
if (defined $::param_checker{$i}) { if (defined $::param_checker{$i}) {
my $ref = $::param_checker{$i}; my $ref = $::param_checker{$i};
...@@ -64,6 +65,8 @@ foreach my $i (@::param_list) { ...@@ -64,6 +65,8 @@ foreach my $i (@::param_list) {
} }
} }
print "Changed $i.<br>\n"; 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} $::param{$i} = $::FORM{$i}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment