diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/Cobrands/Barnet/Util.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Geocode.pm | 1 | ||||
-rw-r--r-- | perllib/Page.pm | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/perllib/Cobrands/Barnet/Util.pm b/perllib/Cobrands/Barnet/Util.pm index eb8b91649..8ce296aaf 100644 --- a/perllib/Cobrands/Barnet/Util.pm +++ b/perllib/Cobrands/Barnet/Util.pm @@ -79,7 +79,7 @@ sub council_check { } my $url = 'http://www.fixmystreet.com/'; $url .= 'alert' if $context eq 'alert'; - $url .= '?pc=' . URI::Escape::uri_escape($q->param('pc')) if $q->param('pc'); + $url .= '?pc=' . URI::Escape::uri_escape_utf8($q->param('pc')) if $q->param('pc'); my $error_msg = "That location is not covered by Barnet. Please visit <a href=\"$url\">the main FixMyStreet site</a>."; return (0, $error_msg); diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm index 17a4d8539..803e32a85 100644 --- a/perllib/FixMyStreet/Geocode.pm +++ b/perllib/FixMyStreet/Geocode.pm @@ -106,6 +106,7 @@ sub string { || mySociety::Config::get('COUNTRY') ne 'GB'; $url .= '&sensor=false&key=' . mySociety::Config::get('GOOGLE_MAPS_API_KEY'); $js = LWP::Simple::get($url); + $js = encode_utf8($js) if utf8::is_utf8($js); File::Path::mkpath($cache_dir); File::Slurp::write_file($cache_file, $js) if $js && $js !~ /"code":6[12]0/; } diff --git a/perllib/Page.pm b/perllib/Page.pm index 447d9eda2..68a027e4b 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -305,7 +305,7 @@ sub footer { my ($q, %params) = @_; my $pc = $q->param('pc') || ''; - $pc = '?pc=' . URI::Escape::uri_escape($pc) if $pc; + $pc = '?pc=' . URI::Escape::uri_escape_utf8($pc) if $pc; my $creditline = _('Built by <a href="http://www.mysociety.org/">mySociety</a>, using some <a href="http://github.com/mysociety/fixmystreet">clever</a> <a href="https://secure.mysociety.org/cvstrac/dir?d=mysociety/services/TilMa">code</a>.'); if (mySociety::Config::get('COUNTRY') eq 'NO') { |