diff options
-rwxr-xr-x | web-admin/index.cgi | 17 | ||||
-rwxr-xr-x | web/index.cgi | 4 |
2 files changed, 11 insertions, 10 deletions
diff --git a/web-admin/index.cgi b/web-admin/index.cgi index 847b6a787..f2ee1c98d 100755 --- a/web-admin/index.cgi +++ b/web-admin/index.cgi @@ -7,10 +7,10 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: index.cgi,v 1.70 2009-03-24 17:34:30 matthew Exp $ +# $Id: index.cgi,v 1.71 2009-08-17 14:48:45 matthew Exp $ # -my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.70 2009-03-24 17:34:30 matthew Exp $'; +my $rcsid = ''; $rcsid .= '$Id: index.cgi,v 1.71 2009-08-17 14:48:45 matthew Exp $'; use strict; @@ -478,6 +478,7 @@ sub admin_edit_report { my $row = dbh()->selectall_arrayref('select * from problem where id=?', { Slice=>{} }, $id); my %row = %{$row->[0]}; + my %row_h = map { $_ => $row{$_} ? ent($row{$_}) : '' } keys %row; if ($q->param('resend')) { dbh()->do('update problem set whensent=null where id=?', {}, $id); @@ -530,16 +531,16 @@ sub admin_edit_report { print <<EOF; <ul> <li><a href="$url">View report on site</a> -<li><label for="title">Subject:</label> <input size=60 type="text" id="title" name="title" value="$row{title}"> -<li><label for="detail">Details:</label><br><textarea name="detail" id="detail" cols=60 rows=10>$row{detail}</textarea> -<li>Co-ordinates: $easting,$northing (originally entered $row{postcode}, $used_map) +<li><label for="title">Subject:</label> <input size=60 type="text" id="title" name="title" value="$row_h{title}"> +<li><label for="detail">Details:</label><br><textarea name="detail" id="detail" cols=60 rows=10>$row_h{detail}</textarea> +<li>Co-ordinates: $easting,$northing (originally entered $row_h{postcode}, $used_map) <li>For council(s): $council (other areas: $areas) <li>$anon <li>$state <li>Category: $row{category} -<li>Name: <input type="text" name="name" id="name" value="$row{name}"> -<li>Email: <input type="text" id="email" name="email" value="$row{email}"> -<li>Phone: $row{phone} +<li>Name: <input type="text" name="name" id="name" value="$row_h{name}"> +<li>Email: <input type="text" id="email" name="email" value="$row_h{email}"> +<li>Phone: $row_h{phone} <li>Created: $row{created} <li>Confirmed: $row{confirmed} <li>Sent: $row{whensent} $resend diff --git a/web/index.cgi b/web/index.cgi index 60b808141..27a52e8f7 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.269 2009-08-14 11:02:50 matthew Exp $ +# $Id: index.cgi,v 1.270 2009-08-17 14:48:45 matthew Exp $ use strict; use Standard; @@ -907,7 +907,7 @@ sub display_problem { my ($lat, $lon) = mySociety::GeoUtil::national_grid_to_wgs84($problem->{easting}, $problem->{northing}, 'G'); my $map_links = "<p id='sub_map_links'><a href='http://maps.google.co.uk/maps?output=embed&z=16&q=" - . uri_escape('<a href="' . $base . '/report/' . $problem->{id} . '">' . $problem->{title} . '</a>') . "\@$lat,$lon'>View on Google Maps</a></p>"; + . uri_escape_utf8('<a href="' . $base . '/report/' . $problem->{id} . '">' . $problem->{title} . '</a>') . "\@$lat,$lon'>View on Google Maps</a></p>"; my $pins = Page::display_pin($q, $px, $py, 'blue'); $out .= Page::display_map($q, x => $x_tile, y => $y_tile, type => 0, |