diff --git a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java index 7a57b8a890..2e1d3d7c68 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java @@ -196,11 +196,17 @@ public class GeoIntentActivity extends OsmandListActivity { private List elements; public GeoAddressSearch(String query) { - StringTokenizer s = new StringTokenizer(query.substring(query - .indexOf("q=") + 2), ","); - elements = new ArrayList(s.countTokens()); - while (s.hasMoreTokens()) { - elements.add(s.nextToken().replace('+', ' ').trim()); + query = query.replaceAll("%20", ",").replaceAll("%0A",",") + .replaceAll("\n",",").replaceAll("\t",",") + .replaceAll(" ", ","); + System.out.println(query); + //String is split on each comma + String[] s = query.substring(query + .indexOf("q=") + 2).split(","); + + elements = new ArrayList(); + for (int i = 0; i