strips whitespaces at start and ends of fields: bug #3369
[irspy-moved-to-github.git] / web / htdocs / details / edit.mc
index de18268..bfe3836 100644 (file)
@@ -1,4 +1,3 @@
-%# $Id: edit.mc,v 1.40 2009-04-15 18:16:46 wosch Exp $
 <%args>
 $op
 $id => undef ### should be extracted using utf8param()
@@ -343,7 +342,7 @@ my %fieldsByKey = map { ( $_->[0], $_) } @fields;
 my %data;
 foreach my $key (&utf8param($r)) {
     next if grep { $key eq $_ } qw(op id update);
-    $data{$key} = utf8param($r, $key);
+    $data{$key} = trimField( utf8param($r, $key) );
 }
 my @changedFields = modify_xml_document($xc, \%fieldsByKey, \%data);
 if ($update && @changedFields) {