aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--perllib/FixMyStreet/Geocode.pm2
-rw-r--r--perllib/FixMyStreet/Geocode/OSM.pm2
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a2678c42..9796c7269 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
* Unreleased
- Front end improvements:
- Simplify footer CSS. #2107
+ - Keep commas in geocode lookups.
- Bugfixes:
- Don't remove automated fields when editing contacts #2163
- Remove small border to left of Fixed banner. #2156
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 = (