diff options
Diffstat (limited to 'web/index.cgi')
-rwxr-xr-x | web/index.cgi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/web/index.cgi b/web/index.cgi index 289f75528..760b08f2b 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.161 2007-08-27 11:40:39 matthew Exp $ +# $Id: index.cgi,v 1.162 2007-08-27 11:47:55 matthew Exp $ use strict; require 5.8.0; @@ -210,8 +210,10 @@ sub submit_problem { my $q = shift; my @vars = qw(council title detail name email phone pc easting northing skipped anonymous category flickr); my %input = map { $_ => scalar $q->param($_) } @vars; - $input{title} = lc $input{title} if $input{title} !~ /[a-z]/; - $input{detail} = lc $input{detail} if $input{detail} !~ /[a-z]/; + for (qw(title detail)) { + $input{$_} = lc $input{$_} if $input{$_} !~ /[a-z]/; + $input{$_} = ucfirst $input{$_}; + } my @errors; my $fh = $q->upload('photo'); |