diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Geocode.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Geocode/OSM.pm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm index aeac0ab6d..d552afaa5 100644 --- a/perllib/FixMyStreet/Geocode.pm +++ b/perllib/FixMyStreet/Geocode.pm @@ -59,7 +59,7 @@ sub string { sub escape { my ($s, $c) = @_; $s = lc($s); - $s =~ s/[^-&\w ']/ /g; + $s =~ s/[^-&\w ',]/ /g; $s =~ s/\s+/ /g; $s = URI::Escape::uri_escape_utf8($s); $s =~ s/%20/+/g; diff --git a/perllib/FixMyStreet/Geocode/OSM.pm b/perllib/FixMyStreet/Geocode/OSM.pm index 4d57007c5..0d296f299 100644 --- a/perllib/FixMyStreet/Geocode/OSM.pm +++ b/perllib/FixMyStreet/Geocode/OSM.pm @@ -30,7 +30,7 @@ sub string { $s = $params->{string} if $params->{string}; $s = FixMyStreet::Geocode::escape($s); - $s .= '+' . $params->{town} if $params->{town} and $s !~ /$params->{town}/i; + $s .= '%2C+' . $params->{town} if $params->{town} and $s !~ /$params->{town}/i; my $url = "${nominatimbase}search?"; my %query_params = ( |