From 7b1f35426dada3eb2d210dfc492e16d2f9a42894 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 12 Oct 2016 22:25:04 +0200 Subject: [PATCH] check if query is valid unicode string --- lib/Geocode.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Geocode.php b/lib/Geocode.php index ae82498f..ec3ce13b 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -772,6 +772,9 @@ class Geocode } $sQuery = $this->sQuery; + if (!preg_match('//u', $sQuery)) { + userError("Query string is not UTF-8 encoded."); + } // Conflicts between US state abreviations and various words for 'the' in different languages if (isset($this->aLangPrefOrder['name:en'])) {